Could you please help me? What I am doing is removing the duplicate html table rows. The following is my code.
$("table#" + Grid + " > tbody > tr").each(function () {
ParentID = $(this).find("td:eq(0) input:checkbox").val();
ParentManufacturer = $(this).find("td:eq(2)").html();
$("table#" + Grid + " > tbody > tr").each(function () {
ChildID = $(this).find("td:eq(0) input:checkbox").val();
ChildManufacturer = $(this).find("td:eq(2)").html();
if (ParentID != ChildID && ParentManufacturer == ChildManufacturer) {
$(this).remove();
}
});
});
The issue is the removed table rows are still doing the loop. Eg. even though I've removed the table row with manucafturer name 'AAA', this row is still in the loop. Hope you understand what i mean. So, the final result is the empty table. Could you pls help me to fix this issue?
$("tr:has(input[value=" + value + "])").remove()?<tr>and the consider all following<tr>elements.