An extremely lightweight star-rating jQuery plugin
bower install --save starrating.js
HTML:
<ul id="starRating"></ul>
Javascript:
(function( $ ) {
$('#starRating').starRating(/* options */)
}(jQuery))
Option | Description |
---|---|
stars | Set the amount of stars that will be generated: Default: 5 |
current | Set the current amount of stars that should be active |
$('#starRating').starRating({
stars: 10,
current: 3
})
Alternatively you can add data-stars="10"
and/or data-current="3"
to your element to achieve the same