Skip to content Skip to sidebar Skip to footer

Conditional Remove Table Row On Jquery

I have some table

Solution 1:

filter can take a function allowing you to specify any condition you'd like. Use this, with find, to grab all table rows that have an image with nophoto_s.jpg as the src, then remove them.

$("tr").filter(function() {
    return $(this).find("img[src*='nophoto_s.jpg']").length > 0;
}).remove();

Here's a fiddle

Post a Comment for "Conditional Remove Table Row On Jquery"

Element?

I have a table and I need the cells to have an element posi…