Thank you, but I can’t manage to get it working. Maybe I’m doing something wrong.
In general.js I changed the below with your code
if( type == 1){ thumbs_rating_class = ".thumbs-rating-up"; }
else{ thumbs_rating_class = ".thumbs-rating-down"; }
jQuery(new_container + thumbs_rating_class ).addClass('thumbs-rating-voted');
If I delete that section and don’t replace it, the class still gets added. When looking in thumbs-rating.php on line 94-95 it has this code:
$link_up = '<span class="thumbs-rating-up'. ( (isset($thumbs_rating_up_count) && intval($thumbs_rating_up_count) > 0 ) ? ' thumbs-rating-voted' : '' ) .'" onclick="thumbs_rating_vote(' . $post_ID . ', 1);" data-text="' . __('Vote Up','thumbs-rating') . ' +">' . $thumbs_rating_up_count . '</span>';
$link_down = '<span class="thumbs-rating-down'. ( (isset($thumbs_rating_down_count) && intval($thumbs_rating_down_count) > 0 ) ? ' thumbs-rating-voted' : '' ) .'" onclick="thumbs_rating_vote(' . $post_ID . ', 2);" data-text="' . __('Vote Down','thumbs-rating') . ' -">' . $thumbs_rating_down_count . '</span>';
Would adjusting something here help? When I change the text of the class thumbs-rating-voted, it also shows a different class in the browser after voting. While if I delete the addClass part in general.js it the class is still being added to the type that was voted on. Of course, I don’t understand javascript, so I might just be doing something wrong.
Hope it’s not a problem for to rely on you for this.