[jQuery] Best way/approach for updating table via ajax

[jQuery] Best way/approach for updating table via ajax


I am still exploring all these, but currently with the idea of
minimizing DOM and jQuery work, I have a table like so:
<table id="serverTable">
<thead>
<tr><th>c1</td><th>c3</td><th>c3</td></tr>
</tread>
<tbody>
</tbody>
</table>
where <tbody> block initially has no rows.
The ajax call, runs a server side applet which returns the rows, a
table without the <table></table> tags and this result is injected
into the <tbody>
$("table#serverTable tbody").html(msg);
This works fine.
Another approach is of course, is return JSON and fill in each cell.
But off hand, I feel that might be slower. Comments?
However, the tbody approach also doesn't allow me to bind any rows,
because they don't exist at start up and I don't think I want to be
binding after each ajax call.
The thing is, the # of rows is unknow and it can grow or shrink at any
giving moment.
Any comments and tips for updating a table with dynamic rows?
Thanks
--
HLS