Thanks. That is cleaner than my workaround. I had

var row = "<tr><td>...</td></tr>";
 $('#docs tbody').append(row);
return row;

I now have

var row = "<tr><td>...</td></tr>";
return row.appendTo('#docs tbody')


On Aug 3, 4:52 pm, James <james.gp....@gmail.com> wrote:
> How about:
>
> $row = $("<tr><td>...</td></tr>");
> var newrow = $row.appendTo("#docs tbody");
>
> On Aug 3, 11:51 am, Brad <nrmlcrpt...@gmail.com> wrote:
>
> > If I add a row to a table in the following manner, how can I get a
> > reference to the added row?
>
> > var row = "<tr><td>...</td></tr>";
> > var newrow;
> > newrow = $('#docs tbody').append(row);
>
> > With the above code new row references the tbody and not the tr.

Reply via email to