Compare two tables rows and remove if match
Posted
by
Istvan
on Stack Overflow
See other posts from Stack Overflow
or by Istvan
Published on 2012-09-24T09:10:18Z
Indexed on
2012/09/24
9:37 UTC
Read the original article
Hit count: 202
jQuery
Could anyone help me please in JQuery? I have two tables on my site leftTable and rightTable with same column names. The leftTable I fill up from a DB, but the rightTable it just contains some rows. What I would like to do is to not show (or remove) in the leftTable those rows which are exist in the rightTable!
I Tryed this:
$("#tableLeft tr").each(function ()
{if ($(this).find("td")[0].innerHTML == $("#tableRight tr").find("td")[0].innerHTML) {$(this).remove;}});
© Stack Overflow or respective owner