encounter a situation where you need to operate the first td, of each tr in table to do the click event
html like this
<table class="datagrid-body">
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
I currently write jquery like this, but only the td of the first tr has the click effect.
how can I make the first td of every tr eat this click effect?
$(document).on("click", ".datagrid-body tr td:first", function (e){
alert("test")
}});