Rating widget for mootools
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Assets
Demos
Source
Logo.png
README.md
package.yml

README.md

mooRate

mooRate is a rating widget. It looks good and provide all the methods and callbacks to work in an ajax environment. There are many different rating widgets available, all using different techniques. This one happens to be my own flavor.

Screenshot

How to use

CSS code:

HTML code:

0%

0%

0%

JS sample:

var rating = new MooRate($$('.moorate'));

rating.setDefaultRate(document.id('myrating1'), "27%");
rating.setDefaultRate(document.id('myrating2'), "5%");
rating.setDefaultRate(document.id('myrating3'), "100%");

var eventHandler = function(target, value) {alert('you picked:'+value+' from element '+target.id)};

document.id('myrating1').addEvent('rated', eventHandler);
document.id('myrating2').addEvent('rated', eventHandler);
document.id('myrating3').addEvent('rated', eventHandler);

Docs

Events:

rated(widget, value): 
    Fires when the user rates.