I have a table like this:
<table id="myTable">
<tr><td>1sta</td><td>2nd</td></tr>
<tr><td>1stb</td><td>2nd</td></tr>
<tr><td>1stc</td><td>2nd</td></tr>
<tr><td>1std</td><td>2nd</td></tr>
</table>
Using jQuery
How do I select the 1st <td> element in each row of “myTable”?
The
first-childselector grabs eachtdthat is the first child of its parent (thetrin this case).http://api.jquery.com/first-child-selector/