I\'d like to check for empty TDs (classes a-h only) and if all are empty, then I\'d like to hide the parent TR. The issues I\'m running into are, my empty TDs contain \" \"
This is what you are looking for:
$(function(){
$('tr').each(function(){
var _hide = true;
$(this).find('td:not(.requirementRight)').each(function(){
if($(this).text().trim() != ''){
_hide = false;
}
});
if(_hide){
$(this).hide();
}
});
})
You check every row for content other than whitespace and hide the row if none was found. have fun! working example: http://jsfiddle.net/kvCXa/7/