JavaScript - - By Sam Deering

jQuery Find and Remove Duplicated Element IDs

This example could be used to fix a featured article for your blogs so that not more than one article is featured on the homepage.

// featured article fix
var myFeatured = $('div.featured').attr('id');
var theHidden;
	theHidden = $(this).attr('id');
	if(theHidden == myFeatured){ 
Login or Create Account to Comment
Login Create Account