Hi,
My jquery is not working as expected:
I am trying to loop through each row then loop through each td and check if a td in a row contains the text 'test1' if so I need disable the link defined in a td with class "ms-vb-icon2" within the same row.
$("tr:has(td:contains('test1')) td.ms-vb-icon.a#click").click(function() { return false; });
My code is as below...
<table class='ms-listviewtable'>
<tr>
<td class='ms-vb2-icon'>
<A onclick='GoToLink(this);return false;' href='http://www.google.com' target='_self'><IMG alt='Edit' src='http://web-hub.net/wiki/skins/largepublisher/icon_edit_small.gif'/></A>
</td>
<td class='ms-vb2'></td>
<td class='ms-vb2'></td>
<td class='ms-vb2'></td>
<td class='ms-vb2'></td>
<td class='ms-vb2'>test1</td>
</tr>
<tr>
<td class='ms-vb2-icon'>
<A onclick='GoToLink(this);return false;' href='http://www.google.com' target='_self'><IMG alt='Edit' src='http://web-hub.net/wiki/skins/largepublisher/icon_edit_small.gif'/></A>
</td>
<td class='ms-vb2'></td>
<td class='ms-vb2'></td>
<td class='ms-vb2'></td>
<td class='ms-vb2'></td>
<td class='ms-vb2'>test2</td>
</tr>
<tr>
<td class='ms-vb2-icon'>
<A onclick='GoToLink(this);return false;' href='http://www.google.com' target='_self'><IMG alt='Edit' src='http://web-hub.net/wiki/skins/largepublisher/icon_edit_small.gif'/></A>
</td>
<td class='ms-vb2'></td>
<td class='ms-vb2'></td>
<td class='ms-vb2'></td>
<td class='ms-vb2'></td>
<td class='ms-vb2'>test3</td>
</tr>
</table>