Socket
Socket
Sign inDemoInstall

starrr

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    starrr

1-5 star rating with jQuery.


Version published
Weekly downloads
91
increased by21.33%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

starrr

1-5 (or 1-n) star rating in < 75 lines of code.

Requirements

  • jQuery

Usage

Create the stars

<div class='starrr'></div>
$('.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

FAQs

Last updated on 17 Oct 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc