Friday, October 21, 2011

Hide a row containing empty cells

Using jQuery, based on this StackOverflow thread:


$("tr").each( function() 
  if ($(this).children("td:not(:empty)").length > 0) { 
    $(this).show(); 
  } else { 
    $(this).hide(); 
  } 
});

No comments:

Post a Comment