Markup:
<tr>
<td colspan="3" rowspan="4">1</td>
<td>2</td>
<td>3</td>
</tr>
jQuery:
$("table tr td:first").addClass("first-col-cell");
$("table tr td:last-child").addClass("last-col-cell");
…according to jQuery documentation :first selector should only select the first td (1) but it also selects other 2.
Thanks
i just made a test page and the code that you posted works just fine. the table does, however, need to be at least 5 columns wide and 4 rows tall or i don’t believe the code will work correctly. the following example shows that the jquery code is working.