JSFiddle - React, Tailwind, and code Playground
by ryleyb
HTML
<table border=1>
<tr onclick="(event.target.tagName.toLowerCase() !== 'td')?alert('fail'):alert('success');">
<td>should work (this row uses event directly)</td>
<td>should work</td>
<td><a href="#">click here should fail</a></td>
<td><a href="#">click here should fail too</a></td>
</tr>
<tr onclick="($.event.fix(event).target.tagName.toLowerCase() !== 'td')?alert('fail'):alert('success');">
<td>should work (this row uses jQuery)</td>
<td>should work</td>
<td><a href="#">click here should fail</a></td>
<td><a href="#">click here should fail too</a></td>
</tr>
</table>