rateThis is a jquery plugin that allows you to easy create rating functionality for your form.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
empty-disabled.png
empty.png Uploading files Feb 8, 2013
examples.html Uploading files Feb 8, 2013
full-disabled.png
full.png Uploading files Feb 8, 2013
hover.png Added custom hover image Feb 8, 2013
rateThis.js Better way to hide input Feb 10, 2013
rateThis.min.js Better way to hide input Feb 10, 2013
zero-disabled.png Uploading files Feb 8, 2013
zero.png Uploading files Feb 8, 2013

README.md

rateThis

rateThis is a jquery plugin that allows you to easy create rating functionality for your form.

Browser Support

rateThis has been tested and should work in

  • Internet Explorer 8+
  • Safari
  • Firefox
  • Chrome
  • Opera

Examples

You can find some examples here.

Usage

Include the code before </body> tag

<script src="/path/to/rateThis.min.js"></script>

Then just add it to one of DOMs elements

<script>
$('#elementsID').rateThis();
</script>

API

Settable Options

Option Description Data Type Default
fullImg Name of image file to use for displaying current rating string 'full.png'
emptyImg Name of image file to use for displaying possible rating string 'empty.png'
zero If true, will display image to set value of rating to zero boolean false
zeroImg Name of image file to use for displaying zero rating string 'zero.png'
value Default value for rating integer 1
max Max value for rating integer 5
hover If true, will display image for highlighting current selected rating boolean true
hoverImg Name of image file to use for displaying for highlight string 'hover.png'
disabled If true, rating will be displayed as disabled boolean false
disabledFullImg Name of image file to use for displaying current rating when disabled string 'full.png'
disabledEmptyImg Name of image file to use for displaying possible rating when disabled string 'empty.png'
disabledZeroImg Name of image file to use for displaying zero rating when disabled string 'zero.png'

Methods

Method Description
disable Disables the rating
enable Enables the rating
update Updates plugin view, for new input value
uncheck Unchecks the checkbox
destroy Removes plugin functionality

License

rateThis plugin is released under MIT license.

Credits

rateThis plugin was created by Michał Kowalkowski. You can contact me at kowalkowski.michal@gmail.com