Wrong behavior if post is duplicated on page
-
My WP-template can list some posts by categories at one page, and if post presents in several categories it shows several times.
postratings-js.js accesses element by ID, so only first element is interactive on mouse over.
I just changed all in postratings-js.js:
#rating_”+post_id+”_” -> img#rating_”+post_id+”_”
#ratings_”+post_id+”_text” -> span#ratings_”+post_id+”_text”
#post-ratings-“+post_id -> div#post-ratings-“+post_id (excepting post_ratings_el=jQuery(“#post-ratings-“+post_id) to prevent double/triple votes)So with this modification jQuery can return more than one element with same ID (though ID must be unique in valid html5, but seems it works fine in all modern browsers).
Sorry, if it’s offtopic, not found where to place bug-reports for the moment.
The topic ‘Wrong behavior if post is duplicated on page’ is closed to new replies.