Properties

Name Type Default
count Number 5

Sets or gets images count.

Code examples

Set the count property.

$('#jqxRating').jqxRating({count:3});

Get the count property.

var count = $('#jqxRating').jqxRating('count');
Try it: count is set to 8
disabled Boolean false

Sets or gets whether the rating widget is disabled.

Code examples

Set the disabled property.

$('#jqxRating').jqxRating({disabled:true});

Get the disabled property.

var disabled = $('#jqxRating').jqxRating('disabled');
Try it: disabled is set to true
height Number/String auto

Sets or gets widget's height.

Code examples

Set the height property.

$('#jqxRating').jqxRating({height:35});

Get the height property.

var height = $('#jqxRating').jqxRating('height');
Try it: height is set to 35
itemHeight Number auto

Sets or gets rating item's height.

Code examples

Set the itemHeight property.

$('#jqxRating').jqxRating({itemHeight:50});

Get the itemHeight property.

var itemHeight = $('#jqxRating').jqxRating('itemHeight');
Try it: itemHeight is set to 30
itemWidth Number auto

Sets or gets rating item's width.

Code examples

Set the itemWidth property.

$('#jqxRating').jqxRating({itemWidth:50});

Get the itemWidth property.

var itemWidth = $('#jqxRating').jqxRating('itemWidth');
Try it: itemWidth is set to 20
precision Number 1

Sets or gets vote precision.

Code examples

Set the precision property.

$('#jqxRating').jqxRating({precision:1});

Get the precision property.

var precision = $('#jqxRating').jqxRating('precision');
Try it: precision is set to 0.5
singleVote Boolean false

Sets or gets whether the user can vote single or multiple times.

Code examples

Set the singleVote property.

$('#jqxRating').jqxRating({singleVote:true});

Get the singleVote property.

var singleVote = $('#jqxRating').jqxRating('singleVote');
Try it: singleVote is set to true
value Number 0

Sets or gets current rating.

Code examples

Set the value property.

$('#jqxRating').jqxRating({value:5});

Get the value property.

var value = $('#jqxRating').jqxRating('value');
Try it: value is set to 3
width Number/String auto

Sets or gets widget's width.

Code examples

Set the width property.

$('#jqxRating').jqxRating({width:150});

Get the width property.

var width = $('#jqxRating').jqxRating('width');
Try it: width is set to 350

Events

change Event

The change event is triggered when the rating is changed.

Code examples

Bind to the changeevent by type: jqxRating.

$('#jqxRating').bind('change', function (event)
{ 
var value = event.value; 
}); 
Try it: Bind to the change event by type: jqxRating.

Methods

disable Method

Disabling the widget.

Parameter Type Description
None
Return Value
None

Code examples

Invoke the disable method.

$('#jqxRating').jqxRating('disable'); 
Try it: disable the jqxRating.
enable Method

Enabling the widget.

Parameter Type Description
None
Return Value
None

Code examples

Invoke the enable method.

$('#jqxRating').jqxRating('enable'); 
Try it: enables the jqxRating.
getValue Method

Getting current rating value.

Parameter Type Description
None
Return Value
None

Code examples

Invoke the getValue method.

$('#jqxRating').jqxRating('getValue'); 
Try it: gets the value in the jqxRating.
setValue Method

Setting value to the rating widget.

Parameter Type Description
value Number
Return Value
None

Code examples

Invoke the setValue method.

$('#jqxRating').jqxRating('setValue', 5); 
Try it: sets the value in the jqxRating.
val Method

Sets or gets the value.

Parameter Type Description
value Number
Return Value
Number

Code example

Invoke the val method.

// Get the value.
var value = $("#jqxRating").jqxRating('val');
// Get the value using jQuery's val()
var value = $("#jqxRating").val();
// Set value.
$("#jqxRating").jqxRating('val', 4);
// Set value using jQuery's val().
$("#jqxRating").val(4);
Try it: sets the value in the jqxRating.