Say I have a table:
<table id="#myTable">
<tr>
Section 1
<td>
<table>
<tr>
Sub 1
<td>Sub2</td>
Sub3
<td>Sub 4</td>
</tr>
</table>
</td>
<td>Section 2</td>
</tr>
</table>
How do I make a jQuery selector for a function that finds the td containing Sub4
and changes its color to red without affecting the background color of all the other ones?
I tried:
$("#myTable td:contains('Sub 4')").css('background','red');
But it appears to think that the outer table also catches the event. How do I get a reference to just the innermost td?