If I understand the script correctly, it adds a class to the clicked element (thumbs-rating-voted). Would it be possible for it to also add a class to the non clicked element after there has been voted?
Thank you!
If I understand the script correctly, it adds a class to the clicked element (thumbs-rating-voted). Would it be possible for it to also add a class to the non clicked element after there has been voted?
Thank you!
Absolutely, you just need to change the part of JavaScript to something like:
if( type == 1){ thumbs_rating_class = ".thumbs-rating-up"; var other_class = ".thumbs-rating-down"; }
else{ thumbs_rating_class = ".thumbs-rating-down"; var other_class = ".thumbs-rating-up"; }
jQuery(new_container + thumbs_rating_class ).addClass('thumbs-rating-voted');
jQuery(new_container + other_class ).addClass('other-class');
برچسب : نویسنده : استخدام کار wpss بازدید : 117