jquery-star-rating-plugin
Rating plugin jQuery
A simple star rating plugin which uses Googles Materialize Icons.
Demo
A demo can be seen on: http://joost.in/ternet/javascript/jquery-star-rating-plugin, or in the example HTML file.
Requirements
- jQuery
- Access to Google Materialize icons (http://www.google.com/design/icons/). See the example HTML file.
Usage
Add the plugin to your source, call it by using:
$('-your-selector-').addRating();
Options
icon : star | favorite
Star is a star, favorite is a heart
max : 5
How many stars you want / max rating.
fieldName : 'rating'
Specific name for the hidden input field.
fieldId : 'rating'
ID attribute of the hidden input field, so you can retrieve the contents easily.
Override Styles
Change the fill color by overriding the "selected" class in your css.
License
Creative Commons / Free to use or alter - leave the
jQuery Star Rating plugin by Joost van Velzen is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Based on a work at https://github.com/jvv/jquery-star-rating-plugin.