Back to MyjQueryPlugins

Exemple 1 (Basic exemple without options) :
<!-- JS to add -->
<script type="text/javascript">
  $(document).ready(function(){
    $(".bacic").jRating();
  });
</script>
Exemple 2 (type : small - average 10 - id 2 - 40 stars) :
<!-- JS to add -->
<script type="text/javascript">
  $(document).ready(function(){
    $(".exemple2").jRating({
	  type:'small', // type of the rate.. can be set to 'small' or 'big'
	  length : 40, // nb of stars
	  decimalLength : 1 // number of decimal in the rate
    });
  });
</script>
Exemple 3 (step : true - average 18 - id 3 - 15 stars) :
<!-- JS to add -->
<script type="text/javascript">
  $(document).ready(function(){
    $(".exemple3").jRating({
	  step:true, // no half-star when mousemove
	  length : 20, // nb of stars
	  decimalLength:0 // number of decimal in the rate
    });
  });
</script>
Exemple 4 (Rate is disabled) :
<!-- JS to add -->
<script type="text/javascript">
  $(document).ready(function(){
    $(".exemple4").jRating({
	  isDisabled : true
	});
  });
</script>
Exemple 5 (With onSuccess & onError methods) :
<!-- JS to add -->
<script type="text/javascript">
  $(document).ready(function(){
    $(".exemple5").jRating({
	  length:10,
	  decimalLength:1,
	  onSuccess : function(){
	    alert('Success : your rate has been saved :)');
	  },
	  onError : function(){
	    alert('Error : please retry');
	  }
	});
  });
</script>
Datas sent to the server :

Server response :