jquery-starrating

An extremely lightweight star-rating jQuery plugin

Demo

Installation

bower install --save starrating.js

Usage

HTML:

<ul id="starRating"></ul>

Javascript:

(function( $ ) {
    $('#starRating').starRating(/* options */)
}(jQuery))

Options

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

Example

$('#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