[jQuery] Select all last cells of all rows?
I swear I've seen a post asking this before, one that I even
participated in, but damned if i can find it
given this table structure
<table>
<thead>
<tr>
<th>One</th>
<th>Two</th>
<th>Three</th>
</tr>
</thead>
<tbody>
<tr>
<td>R1C1 Data</td>
<td>R1C2 Data</td>
<td>R1C3 Data</td> ***
</tr>
<tr>
<td>R2C1 Data</td>
<td>R2C2 Data</td>
<td>R2C3 Data</td> ***
</tr>
<tr>
<td>R3C1 Data</td>
<td>R3C2 Data</td>
<td>R3C3 Data</td> ***
</tr>
</tbody>
</table>
How can i select all the last cells that I denoted by "***" ??
I am currently doing:
$("table tbody tr").each(function() {
$(this).find("td:last").click(... my event here ....);
});
but is that doable without the ".each" ?