How would i go about adding a class to a td tag given the following table:
<table>
<tr>
<td id="1"></td>
<td id="2"></td>
<td id="3"></td>
</tr>
</table>
I would like to add the class to the td with the id of 2. The class name in my case is td_highlight.
Have tried a few different scripts with no luck.
Thanks in advance,
Billy
I am not including td in the selector because all your ids (by definition) should be unique in the page.
see the relevant bit of documentation for further reference.