Cookie-enabled jQuery Star Rating Plugin - starz

File Size: 5.27 KB
Views Total: 1597
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Cookie-enabled jQuery Star Rating Plugin - starz

starz is a jQuery plugin to create a pretty star rating widget on your webpage that uses jQuery cookie plugin to store selected value of rating in cookies. Dual licensed under the MIT and GPL licenses.

How to use it:

1. Load the necessary jQuery library and jQuery cookie plugin in the web page.

<script src="jquery.min.js"></script>
<script src="jquery.cookie.min.js"></script>

2. Load the jQuery starz plugin's files in the web page. Note that the jquery.starz.js should be placed after jQuery library.

<link rel="stylesheet" href="jquery.starz.css">
<script src="jquery.starz.js"></script>

3. Create a div element on your webpage that will contain the star rating widget.

<div class="rating"></div>

4. Call the plugin to generate a star rating widget.

var state = $.cookie('starz');
$('.rating').starz(10, state).bind('rated', function(event, data) {
  $.cookie('starz', data.rating);
});

This awesome jQuery plugin is developed by microtroll. For more Advanced Usages, please check the demo page or visit the official website.