I have a table with structure like this :
<table>
<tr id="ui-id-7" onclick="editThis();">
<td>100</td>
<td>Test</td>
<td class="noEdit"><a href="www.mysite.com" target="_blank"><img src="www.mysite.com/test.jpg"></a></td>
</tr>
</table>
What I need : the entire <tr>
is clickable and calls the editThis()
method, UNLESS if the user clicks on the <td>
that has the link element (in case, the one with noEdit
class).
In the code above, clicking on ANY <td>
(or the <tr>
) will call the editThis()
method. I know I could write the call for each <td>
instead of the <tr>
, but this would be a lot of writing...
Is this possible?