How to handle click on <tr> but not on child elements?
I am handling the click with the following code.
Entry table
<table>
<tr>
<td>
<input type="checkbox" />
</td>
</tr>
</table>
Click handler
$('table tr').click(function(){
alert('clicked');
});
It works well, but if I have a checkbox in the td, it handles it when clicked as well.
Is there a way to handle the TR click but not activate the children?
+3
source to share