I need to get a tr element which contains a td element which contains specific text. The td will contain that text and only that text
I know this is an old post but I thought I could share an alternative [not as robust, but simpler] approach to searching for a string in a table.
$("tr:contains(needle)"); //where needle is the text you are searching for.
For example, if you are searching for the text 'box', that would be:
$("tr:contains('box')");
This would return all the elements with this text. Additional criteria could be used to narrow it down if it returns multiple elements