Jquery has a way to manipulate the first td? of each tr

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")
}});

Mar.29,2021

: firstchild


get all tr, recycling binding events


td:nth-child (1)

try the nth-child () selector


you can read this article. Getting the first td, in each tr in the table is very simple:
two ways for jquery to get the first td cell in all the tr rows of the table

Menu