#exceptions
is a html table. I try to run the code below, but it doesn't remove the table row.
$('#exceptions').find('tr').each(function(){
var flag=false;
var val = 'excalibur';
$(this).find('td').each(function(){
if($(this).text().toLowerCase() == val)
flag = true;
});
if(flag)
$(this).parent().remove($(this));
});
What is the correct way to do it?