- Get the image elements you need with
.find()
. - Use
.filter()
with a filter function to get only the images you need. - The filter function will run for every image (
this
will always refer to the current image's DOM element). If you returntrue
from the function, the image will be included in the result set - otherwise it is omitted. - On the resulting set (that only includes the filtered images) call
.remove()
.
Something like this:
$(v).find('td:nth-of-type(4) img').filter(function () {
return $(this).attr('src') === THE_URL_YOU_WANT_TO_CHECK;
}).remove();
UPDATE:
After some clarification, it seems you want to remove the whole table row.
In this case you need to modify the code a bit:
$('#id tr').filter(function() {
return $(this).find('td:nth-of-type(4) img').attr('src') === THE_URL_YOU_WANT_TO_CHECK;
}).remove();
And a little demo.