[jQuery] Re: get reference to nested appended element

2009-04-09 Thread miniswi...@gmail.com
thanks for the useful infomation! On Apr 7, 11:00 pm, mkmanning wrote: > Caveat: > Jonathan's method will get you the child table (the one with id rt0 > from the original OP's example), however Eric's will get you all > tables that are children of a table, within the context of the parent > cont

[jQuery] Re: get reference to nested appended element

2009-04-07 Thread mkmanning
Caveat: Jonathan's method will get you the child table (the one with id rt0 from the original OP's example), however Eric's will get you all tables that are children of a table, within the context of the parent container. So in the latter case, if the parent already had a set of nested tables befo

[jQuery] Re: get reference to nested appended element

2009-04-07 Thread Eric Garside
parent.append(""); var table = $('table table', parent); Be sure to close your inner 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" wrote: > Another approach you can take is: > > var table = $(' id="rt0">') >      

[jQuery] Re: get reference to nested appended element

2009-04-07 Thread Jonathan Sharp, Out West Media
Another approach you can take is: var 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. Cheer