Wijmo UI for the Web
wijrating jQuery Widget
Create a star rating widget, or use bars, thumbs-up or -down, or create custom icons for the user to click.
Syntax
$(function () {
    var options; // Type:  wijmo.rating.wijrating.options
     
    $(".selector").wijrating(options);
});
function wijrating() : any;
Options
 NameDescription
public Option

Default value: null

An option that controls aspects of the widget's animation, such as the animation effect and easing.

 
public Option

Default value: 5

A value that determines the number of stars to display.

 
public Option

Default value: 'normal'

The direction option determines the direction in which items are rated.

 
public Option

Default value: false

A value that determines whether or not to disable the rating widget.

 
public Option

Type: wijmo.rating.wijrating_hint

A value that controls the hint information shown when hovering over the rating star.

 
public Option

Default value: 16

An option that determines the height of the icon. All icons should have the same height.

 
public Option

Type: wijmo.rating.wijrating_icons

A value that indicates the settings for customized rating icons.

 
public Option

Default value: 16

An option that determines the width of the icon. All icons should have the same width.

 
public Option

Default value: null

An option that defines the maximum value that can be rated using the rating widget.

 
public Option

Default value: null

An option that defines the minimum value that can be rated using the rating widget.

 
public Option

Default value: 'horizontal'

The orientation option determines the orientation of the rating widget.

 
public Option

Default value: 'continuous'

The ratingMode option determines how the widget performs the rating function. The widget can rate things continuously or singly.

 
public Option

Type: wijmo.rating.wijrating_resetButton

The resetButton option determines the properties of the widget's reset button.

 
public Option

Default value: 1

An option that determines the number of sections into which each star will be split.

 
public Option

Default value: 5

An option that determines the total value of the rating widget.

 
public Option

Default value: 0

An option that determines the rated value of the rating widget.

 
Top
Methods
 NameDescription
public MethodThe destroy() method will remove the rating functionality completely and will return the element to its pre-init state.  
public MethodReturns a jQuery object containing the original element or other relevant generated element.  
Top
Events
 NameDescription
public EventThe hover event fires when a user hovers over a rating icon. You can use this event to trigger something, such as an alert, when a user hovers over one of the rating icons.  
public EventThe rated event fires after the widget is rated.  
public EventThe rating event fires before widget rating. You can use this event if you'd like to track the rated values. You can cancel this event by returning false.  
public EventThe reset event fires when the reset button is clicked.  
Top
See Also

Widgets

Rating

Reference

wijrating jQuery Widget