#exceptions
htmlテーブルです。以下のコードを実行しようとしましたが、テーブルの行が削除されません。
$('#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));
});
それを行う正しい方法は何ですか?