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');
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');
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');
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');
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');
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');
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');
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');
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');

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; 
}); 

Methods

disable Method

Disabling the widget.

Parameter Type Description
None
Return Value
None

Code examples

Invoke the disable method.

$('#jqxRating').jqxRating('disable'); 
enable Method

Enabling the widget.

Parameter Type Description
None
Return Value
None

Code examples

Invoke the enable method.

$('#jqxRating').jqxRating('enable'); 
getValue Method

Getting current rating value.

Parameter Type Description
None
Return Value
None

Code examples

Invoke the getValue method.

$('#jqxRating').jqxRating('getValue'); 
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); 
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);

AltStyle によって変換されたページ (->オリジナル) /