[jQuery] Re: Simple Question with Clone() and Append()

2009-08-18 Thread Carlos Becar
this use clone and insertAfter(insert after clone element) and update the content var insertDataBefore = $('#tablaFormulario').find('tr:last') insertDataBefore.clone(true).insertAfter(insertDataBefore).find("td").each(function() { $(this).find("select").attr({"name":"tipo"+count,value:""});

[jQuery] Re: Simple Question with Clone() and Append()

2009-08-18 Thread Renato Untalan
Thank you! On Aug 18, 11:05 am, Charlie Griefer wrote: > As per the docs (http://docs.jquery.com/Manipulation/append#content), > append() appends "content to the *inside* of every matched element." > > You can try appending to the current matched element's parent, or try the > after() method (ht

[jQuery] Re: Simple Question with Clone() and Append()

2009-08-18 Thread Charlie Griefer
As per the docs (http://docs.jquery.com/Manipulation/append#content), append() appends "content to the *inside* of every matched element." You can try appending to the current matched element's parent, or try the after() method (http://docs.jquery.com/Manipulation/after#content) On Tue, Aug 18, 2

[jQuery] Re: Simple Question with Clone() and Append()

2009-08-18 Thread Ed Allen
Replace .append() with .after() I think. On Aug 18, 10:52 am, Renato Untalan wrote: > I'm trying to clone an element, more specifically a fieldset tag. > > Original HTML: > Hello World. > > Javascript: > $("fieldset").each(function(count,item){ >   var fieldsetBlock = $(this).append($(this).clon

[jQuery] Re: Simple Question with Clone() and Append()

2009-08-18 Thread Renato Untalan
Thank you Ed! On Aug 18, 11:05 am, Ed Allen wrote: > Replace .append() with .after() I think. > > On Aug 18, 10:52 am, Renato Untalan wrote: > > > I'm trying to clone an element, more specifically a fieldset tag. > > > Original HTML: > > Hello World. > > > Javascript: > > $("fieldset").each(fun