Posted By

lexx on 10/06/09


Tagged

featured


Versions (?)

Find duplicated id and remove the one with JQuery


 / Published in: jQuery
 

  1. //Featured article fix//
  2. var myFeatured = $('body.front div.featured').attr('id');
  3. var theHidden;
  4.  
  5. $('body.front .front-latest-news div.article').each(function(){
  6. theHidden = $(this).attr('id');
  7.  
  8.  
  9. if(theHidden == myFeatured){
  10. $('body.front div.front-latest-news div#'+theHidden).hide();
  11. }
  12. });

Report this snippet  

You need to login to post a comment.