I use jQuery Raty plugin. It's great and does most of what I need. I've been searching for a solution to not highlight stars when a user moves cursor over the control. Making it just readOnly: true
doesn't help because it disables click
event which I need to handle.
I tried to bind to mouseover
event:
mouseover: function(score, evt) {
this.score = 0;
}
But Raty doesn't promote its data (this.score
) back to DOM.
I then tried to handle mouseover
event to change each image's src
attribute:
mouseover: function(score, evt) {
rateControl.children().each(function(img) {
img.attr('src', 'star-off.png');
});
}
Again, no result desirable.
What way should I think to disable star highlighting without disabling click
event on Raty?