starrr

by dobtco

dobtco / starrr

1-5 star rating, in jQuery.

206 Stars 102 Forks Last release: over 4 years ago (2.0.1) 25 Commits 7 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

starrr

1-5 (or 1-

n
) star rating in < 75 lines of code.

Requirements

  • jQuery

Usage

Create the stars

$('.starrr').starrr()

With an existing rating

$('.starrr').starrr({
  rating: 4
})

With more than 5 stars

$('.starrr').starrr({
  max: 10
})

Read-only

$('.starrr').starrr({
  readOnly: true
})

Do something with the rating...

$('.starrr').starrr({
  change: function(e, value){
    alert('new rating is ' + value)
  }
})

Or if you prefer events:

$('.starrr').on('starrr:change', function(e, value){
  alert('new rating is ' + value)
})

Developing

  • npm install
  • npm install -g grunt-cli
  • Make changes in
    src/
  • Run
    grunt
    to compile them

License

MIT

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.