jQuery Raty - A Star Rating Plugin - http://wbotelhos.com/raty
jQuery Raty is a plugin that generates a customizable star rating.
The jQuery Raty is licensed under The MIT License
@version 2.1.0
@since 2010.06.11
@author Washington Botelho
@documentation wbotelhos.com/raty
@twitter twitter.com/wbotelhos
- jquery.raty.min.js
- star-on.png
- star-off.png
cancel: false // Show a button to cancel the rating or not.
cancelHint: 'cancel this rating!' // The hint information.
cancelOff: 'cancel-off.png' // Name of the cancel image off.
cancelOn: 'cancel-on.png' // Name of the cancel image on.
cancelPlace: 'left' // Position of the cancel button.
click: undefined // Default callback function.
half: false // Active the half star.
halfShow: true // Enables half star display.
hintList: ['bad', 'poor', 'regular', 'good', 'gorgeous'] // A hint information for default 5 stars.
iconRange: undefined // Object list representing each icon with position and names.
noRatedMsg: 'not rated yet' // A hint for no rated elements when it's read-only.
number: 5 // Number of star.
path: 'img // Path of images.
readOnly: false // read-only or not.
scoreName: 'score' // The name of target score.
size: 16 // The icons size.
starHalf: 'star-half.png' // The image of the half star.
space: true // Option to take off the spaces between the star.
starOff: 'star-off.png' // Name of the star image off.
starOn: 'star-on.png' // Name of the star image on.
start: 0 // Start with a score value.
target: undefined // Element selector where the rating will be displayed.
targetKeep: false // If the last choose value will be keeped on mouseout.
targetText '' // Default value when there's no score or targetKeep is off.
targetType: 'hint' // What display on target element: hint or number.
width: undefined // The container width of the stars.
$('#star').raty();
<div id="star"></div>
$('.star').raty();
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
$('#star').raty('start', 3); // Starts with 3 stars.
$('#star').raty('click', 2); // Click on the second star.
$('.star').raty('readOnly', true); // Adjusts all elements with class called 'star' for read-only.
$('#star').raty('cancel', true); // Cancel the rating. The second optional parameter enables the callback.
$('#star').raty('score'); // Recovers the current score. Class returns an array or null for no rated.
- Daniel Faria
- Eric Wendelin
- Francisco Souza
- Gabriel Benz
- hpgihan
- jeongee
- Olle Jonsson
You can do it by PayPal. Thanks! (: