HTML:
<table>
<tr>
<td>
<a href="#" class="nav">link</a>
<td>
</tr>
</table>
I want to: FIND TEXT 'link' in a.nav and ADD ID "abc" to 'table'. Tried this but it doesn't work:
$('table>tbody>tr>td>a.nav:contains("Forum Index")').parents('table').attr('id', 'newID');
(tbody because most browsers add it automatically)