[Answered ]-Lock Star Rating System After User Votes – RateIt jQuery Plugin

2πŸ‘

βœ…

The toggle happens because of this part: !$(ri).rateit('readonly').
This is build from two parts ! and $(ri).rateit('readonly'). The exclamation mark (!) is the logical not operator, and negates whatever comes after it, ($(ri).rateit('readonly').

So it says, take the current value of the readonly property, and flip it, thus
creating the toggle effect.

What you want to do is:

$(ri).rateit('readonly', true);

Which forces it into readonly mode.

πŸ‘€Gideon

Leave a comment