I have a table structure like the one shown below:
<table id="result">
<tr>
<td id="groupx">
<table>
<tr>
<td>Data</td>
</tr>
</td>
</tr>
</table>
I want to add a TD to the last tr of table result. Trying x.appendTo($("#result tr:last"));
isn’t working since it’s adding to the last tr of a table id “group”
Any sugestions on how I can keep using this structure of html and do this?
While Nadia’s answer was almost good, it missed one thing: browsers put all direct
trchilds of atableinto atbodyelement, so this:gets translated internally to this:
So all you need to do is this:
Let me know if it works.