> var table = document.createElement('table');
In jQuery it is super-simple:
var table = $('<table>');
Append a child row:
table.append('<tr>');
Or do it all at once:
var table = $('<table>').append('<tr>').prepend('<td>Data</td>');
Refer to the DOM Manipulation docs at:
http://docs.jquery.com/DOM/Manipulation
All that functionality is included in the core!
Charles
doublerebel.com
On Aug 23, 9:28 am, ralphz <[EMAIL PROTECTED]> wrote:
> Hi
>
> I discovered jQuery few weeks ago and start playing with it few days
> ago. It's really good tool but I have not found anywhere the feature
> or hack to do what I need in one of my applications.
>
> Is there a way to manipulate objects that are not yet part of the DOM?
> In another words I need to manipulate on some objects but I only have
> reference to it.
>
> Example:
>
> var table = document.createElement('table');
>
> //here i do all sorts of table row and cell inserts. Very dynamically
> driven code
>
> //here would like to manipulate on this build table with jQuery and
> add it to the DOM at some place.
>
> How can I do that? And I can't create table, rows, cells using $
> ('<table></table>) because I already have a lot of code building those
> tables.