Reputation: 43893
If I have a html structure like this
<table>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
etc...
Where the table tags just repeat. How would could I write a select statement that would get the third td tag from every table tag?
Thanks
Upvotes: 0
Views: 213
Reputation: 20173
You can actually use:
$('table tbody tr td:last-child')
wich would work in css3, too:
table tbody tr td:last-child{
background:red;
}
Upvotes: 0