How to exclude a specific TD (like the first one) from the row event of jQuery that I created below?
jQuery("#list tbody tr").click(function(){
alert('click this');
//some code here
});
jQuery("#list tbody tr td.exclude").click(function(){
alert('click not that');
//some code here
});
td { border: 1px solid black; padding: 5px; }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table id="list">
<tr>
<td class="exclude">first</td>
<td>second</td>
<td>third</td>
</tr>
<tr>
<td class="exclude">first</td>
<td>second</td>
<td>third</td>
</tr>
</table>
I need to be able to have an event for my row but exclude from all TD with class exclude, is that possible?