I don't know how to phrase this question better, so a quick snippet of my code should explain what I want:
$("tr").each(function(){
if($(this).find("img[src='https://example.com/img.png']")){
console.log($(this).find("a.myClass").text());
}
});
I have a table with many rows in it (hundreds), and i'm trying to indentify the correct row by seeing if it has a certain image inside of it. After the row is indentified, it looks for a link using its class as the selector and then prints out its text content.
The problem is that the code above doesn't work, and I can't figure out why. It prints out text from table rows that don't have the correct image