Previously voted checked "state"
-
Hi,
Love the plugin.
I have a question. I’ve customised the output a bit so it uses a heart icon instead of a vote up button.
I’ve noticed a bit of an issue in your thumbs_rating_check function in thumbs-rating.php.
// Check if this content has localstorage
if (localStorage.getItem(itemName)){
It does add the thumbs-rating-voted class as expected, but it’s not restricted to the user. If I view the site in different browsers, the same set of posts are marked with that class. Even at my computer at work. It looks the class is assigned to posts that have more (and I assume less) than 0 votes.
The weird thing however is that thumbs_rating_vote() detects the previous vote just fine (in general.js).
I’m going to see if there’s a fix anyway.
- The topic ‘Previously voted checked "state"’ is closed to new replies.