A lightweight Js library to add star rating component.
- Add interactive star rating components to get rating from users.
- Add readonly star rating component to show rating to
- Download rating script and add in your project
- Download rating css and add in your project
<!-- data-rating for initial rating -->
<div class="ratings" data-rating="3.8"></div>
ratingPlugin.init({
selector: 'ratings', //Rating component class
onChange: (el, value) => { //On change function, which returns user input and set rating function
console.log('Rating Value : ', value);
ratingPlugin.setRating(el, 3.5)
}
});
MIT
Free Software, Hell Yeah!