How to exclude the first td on the click event of jquery that I created below? I want to exclude the all first td of the rows on the click event that produces dialog box.
jQuery("#list tbody tr").click(function(){
//some code here
});
<table>
<tr>
<td>first</td>
<td></td>
<td></td>
</tr>
<tr>
<td>first</td>
<td></td>
<td></td>
</tr>
</table>
How about using the first-child
selector combined with :not
:
jQuery("#list tbody tr td:not(:first-child)").click(function(){
//some code here
});
Example: http://jsfiddle.net/Rq8Xf/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With