Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

starrating


jQuery Raty - A Star Rating Plugin

jQuery Raty is a plugin that generates a customizable star rating automatically.

With default options:

$('#default').raty();

<div id="default"></div>

Started with a score and read only value:

$('#fixed').raty({
    readOnly:  true,
    start:     2
});

<div id="fixed"></div>

With a custom score name and a number of stars:

$('#number').raty({
    scoreName:  'entity.score',
    number:     10
});

<div id="number"></div>

With a custom hint and icons:

$('#icon').raty({
    hintList:  ['a', '', null, 'd', '5'],
    starOn:    'medal-on.png',
    starOff:   'medal-off.png'
});

<div id="icon"></div>

Using onClick function:

$('#click').raty({
    onClick: function(score) {
      alert('score: ' + score);
    }
});

<div id="click"></div>

Simple starRating

Plugin is simple, but bundled with several cool features, it sends rating to a scrip via jQuery ajax call, and updates value on stars depending on current rate.
All you need to do is create your own stars or other images you want to use, and you are ready to go.

Usage:

$(document).ready(function() {
    $('#ratingID').starRating({
          basicImage  : 'star.png',
          hoverImage : 'star_hover.png',
          ratingUrl       : 'rate.php',
          paramId       :  'photo237',
          paramValue  : 'rateVal'
    });
});

Please visit project's homepage or download zip for detailed instructions and examples.


All options you can override (default values):

  • basicImage : 'star.gif', //can be subdir like 'images/star.gif'
  • ratedImage : 'star_rated.gif',
  • hoverImage : 'star_hover.gif',
  • ratingStars : 5, //how much stars to draw