parent.append("<table><tr><td><table></table></td></tr></table>"); var table = $('table table', parent);
Be sure to close your inner <table> tag. IE doesn't like when you try and generate fragments of code, iirc. On Apr 7, 12:28 pm, "Jonathan Sharp, Out West Media" <jquery- li...@outwestmedia.com> wrote: > Another approach you can take is: > > var table = $('<table><tr><td><table > id="rt0"></td></tr></table></td></tr></table>') > .appendTo( parent ) > .find('table'); > > This creates the HTML and then appends it to the parent. Since you created a > jQuery object with that fragment, calling find will locate the inner table. > > Cheers, > - Jonathan > > On Tue, Apr 7, 2009 at 4:38 AM, miniswi...@gmail.com > <miniswi...@gmail.com>wrote: > > > > > hi there, see next example: > > > parent.append("<table><tr><td><table id=\"rt0\"/></td></tr></table>"); > > table = $("#rt0"); > > > is it possible to reference the inside table directly without using > > the id to select it?