Skip to content

ThomasDev-de/star-rating

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery star-rating plugin

OPTIONS

let DEFAULTS = {
    wrapperClasses: 'p-5 shadow',
    starIconEmpty: 'fa fa-star-o',
    starIconFull:'fa fa-star',
    starColorEmpty: 'lightgray',
    starColorFull:'#FFC107',
    starsSize: 4, // em
    stars: 5,
    showInfo:true,
    titles: ["Sehr schlecht", "Schlecht", "Mittel", "Gut", "Sehr gut!"],
    inputName: 'rating'
};

EVENTS

// trigger when star is clicked
$('.rating').on('change', function (e, stars, index) {
});

EXAMPLE

<div class="rating"></div>
$('.rating').starRating();

$(document).on('change', '.rating', function (e, stars, index) {
    alert(`Thx for ${stars} stars!`);
});

About

jQuery star rating

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors