I assume you have something like this:
<table id="T1">
<tr><td>111</td></tr>
<tr><td>222</td></tr>
<tr><td>333</td></tr>
</table>
<table id="T2">
<tr><td>444</td></tr>
<tr><td>111</td></tr>
<tr><td>333</td></tr>
</table>
To remove rows from a table with id = "T2", you can do something like this:
$('#T1 tr').each(function(){
var currentRowHTML=$(this).html();
$('#T2 tr').each(function(){
if($(this).html()===currentRowHTML){
$(this).remove();
}
});
});
source
share