
jQuery Bar Rating Plugin
Minimal, light-weight jQuery ratings.
jQuery Bar Rating Plugin works by transforming a standard select box into a rating widget. It’s only 4kb minified and easy to style with CSS. Take a look at a few examples.
Configuration
initialRating:nullPass an option value to specify initial rating. If null, the plugin will try to set the initial rating by finding an option with a `selected` attribute.
showValues:falseIf set to true, rating values will be displayed on the bars.
showSelectedRating:trueIf set to true, user selected rating will be displayed next to the widget.
reverse:falseIf set to true, the ratings will be reversed.
readonly:falseIf set to true, the ratings will be read-only.
Methods
$('select').barrating('show');Shows the rating widget.
$('select').barrating('clear');Clears the rating.
$('select').barrating('destroy');Destroys the rating widget.
Callbacks
onSelect:function(value, text)Fired when a rating is selected.
onClear:function(value, text)Fired when a rating is cleared.
onDestroy:function(value, text)Fired when a rating is destroyed.
License
Dual licensed under the MIT and GPL licenses:
http://www.opensource.org/licenses/mit-license.php
http://www.gnu.org/licenses/gpl.html