Skip to content

irfan/jquery-star-rating

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
min
 
 
src
 
 
 
 
 
 

jQuery Star Rating Plugin

How to use

Detailed documentation and working demo here.

Example HTML

<div class="container">
    <input type="radio" name="example" class="rating" value="1" />
    <input type="radio" name="example" class="rating" value="2" />
    <input type="radio" name="example" class="rating" value="3" />
    <input type="radio" name="example" class="rating" value="4" />
    <input type="radio" name="example" class="rating" value="5" />
</div>

Simple usage

$('.container').rating();

Using with callback method

$('.container').rating(function(vote, event){
    // console.log(vote, event);
});

Example of using ajax

$('.container').rating(function(vote, event){
    // write your ajax code here
    // For example;
    // $.get(document.URL, {vote: vote});
});