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
tr
td
$(function(){ var search = 'foo'; $("table tr td").filter(function() { return $(this).text() == search; }).parent('tr').css('color','red'); });
Will turn the text red for rows which have a cell whose text is 'foo'.