jRating, very flexible jQuery plugin for quickly creating an Ajaxed star rating system.
jRating description
jRating is a very flexible jQuery plugin for quickly creating an Ajaxed star rating system. It is possible to configure every detail from" the number of the stars" to "if the stars can represent decimals or not".
There is also an option to display small or big stars and images can be changed with any other file easily.
Although the plugin can be used with any scripting language, a PHP file that handles the requests is already included in the download package.
jRating download package
- jRating v2.2
- jquery
- jquery.js
- jRating.jquery.css
- jRating.jquery.js
- jRating.jquery.min.js
- icons
- stars.png
- small.png
- bg_jRatingInfos.png
- php
- jRating.php
- index.php
- jquery
jRating implementation
1. First, include the CSS & jQuery files
<!-- include CSS & JS files -->
<!-- CSS file -->
<link rel="stylesheet" type="text/css" href="jRating.jquery.css" media="screen" />
<!-- jQuery files -->
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jRating.jquery.js"></script>
2. Add your HTML !
<!-- basic exemple -->
<div class="exemple">
<!-- in this exemple, 12 is the average and 1 is the id of the line to update in DB -->
<div class="basic" id="12_1"></div>
<!-- in this other exemple, 8 is the average and 2 is the id of the line to update in DB -->
<div class="basic" id="8_2"></div>
</div>
3. Now, call the jRating plugin
<script type="text/javascript">
$(document).ready(function(){
// simple jRating call
$(".basic").jRating();
// more complex jRating call
$(".basic").jRating({
step:true,
length : 20, // nb of stars
onSuccess : function(){
alert('Success : your rate has been saved :)');
}
});
});
</script>
jRating methods
- onSuccess
- Function
- Default : null - Callback function in case of success during rating.
- onError
- Function
- Default : null - Callback function in case of failure during rating.
Who use jRating on the web ?
If you use jRating Plugin into your website and you want to be added here, please contact us !
We will add you with pleasure :)
How can you help us ?
If you love our work, you can show us your admiration by having a look on the ads, free for you, good for us =).THANKS !