First of all, excuse-me if I do some english mistakes, I am french. I am using the raty jquery plugin in order to put something in my favorites, I have got 1 star which can be clicked to set something in my favorites. As I said in the title, I need to know if that star is on or not.
I already tried to use the score value but it returns the score of the star under the mouse (always 1) and not the actual selected score (undefined or 1 in my case).
Here is my code:
$('.fav-star').raty({
mouseover: function(score,evt) {
if(1){ //is raty on ?
$(this).raty('set', { hints: ['Retire from favorites']});
}
else {
$(this).raty('set', { hints: ['Add to favorites']});
}
}
}
I just need to know what is the right condition to put in the if(). Thanks for your help !