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
Javascript (Usage) 
$(function () {
    var options; // Type:  wijmo.rating.wijrating.options
     
    $(".selector").wijrating(options);
});
Javascript (Specification) 
function wijrating() : any;
Browser Compatibility
7
5
5
Options
 NameDescription
public Optionanimation

Default value: null

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

 
public Optioncount

Default value: 5

A value that determines the number of stars to display.

 
public Optiondirection

Default value: 'normal'

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

 
public Optiondisabled

Default value: false

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

 
public Optionhint

Type: wijmo.rating.wijrating_hint

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

 
public OptioniconHeight

Default value: 16

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

 
public Optionicons

Type: wijmo.rating.wijrating_icons

A value that indicates the settings for customized rating icons.

 
public OptioniconWidth

Default value: 16

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

 
public Optionmax

Default value: null

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

 
public Optionmin

Default value: null

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

 
public Optionorientation

Default value: 'horizontal'

The orientation option determines the orientation of the rating widget.

 
public OptionratingMode

Default value: 'continuous'

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

 
public OptionresetButton

Type: wijmo.rating.wijrating_resetButton

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

 
public Optionsplit

Default value: 1

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

 
public OptiontotalValue

Default value: 5

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

 
public Optionvalue

Default value: 0

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

 
Top
Methods
 NameDescription
public MethoddestroyThe destroy() method will remove the rating functionality completely and will return the element to its pre-init state.  
public MethodwidgetReturns a jQuery object containing the original element or other relevant generated element.  
Top
Events
 NameDescription
public EventhoverThe 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 EventratedThe rated event fires after the widget is rated.  
public EventratingThe 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 EventresetThe reset event fires when the reset button is clicked.  
Top

See Also

Widgets

Rating

Reference

wijrating jQuery Widget

 

 


© 2013 All Rights Reserved.

Send comments on this topic.