Code Monkey home page Code Monkey logo

ratethis's Introduction

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 [email protected]

ratethis's People

Contributors

michalkow avatar

Watchers

Jason Kyle avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.