[jQuery] Re: clone() help

2008-05-02 Thread elle
Tried again, but changed the code so the new product will be prepended to the fieldset#step1 -- so, it's always at the top of the page. $("#add").click(function() { $("div.product-template:first").clone(true).prependTo("#step1"); }); Events get copied but

[jQuery] Re: clone() help

2008-05-02 Thread elle
Hi KArl, I didn't know that. Will try again. Elle On May 3, 2:43 am, Karl Swedberg <[EMAIL PROTECTED]> wrote: > Hi Elle, > > When the book was published, .clone() didn't have the event-cloning > option. That was added in one of the 1.2.x releases. So if you're > using a version of jQuery after

[jQuery] Re: clone() help

2008-05-02 Thread Karl Swedberg
Hi Elle, When the book was published, .clone() didn't have the event-cloning option. That was added in one of the 1.2.x releases. So if you're using a version of jQuery after 1.1.x, you should remove the cloneEvents.js script and try with .clone(true) --Karl _ Karl Swedb

[jQuery] Re: clone() help

2008-05-02 Thread elle
Hi Karl, and thank you for your reply. This didn't really work -- unless I missed something important on the way. I was reading "Learning jQuery" and it says that .clone() doesn't copy the events related to the cloned items (which I need). It suggested to use copyEvents.js So, I have that script

[jQuery] Re: clone() help

2008-05-01 Thread Karl Swedberg
Hi Elle, Here are a few thoughts. Your code: $("#add").click(function() { $(".product-template").clone().appendTo(".product-template:last- child"); }); - Do you have this inside a document.ready? $(document).ready(function() { $("#add").click(function() { $(".product-template").clo

[jQuery] Re: clone help

2008-01-17 Thread Lionel Martelly
thank you but about remove()? where do I use it> - Original Message - From: "KidsKilla .grin! wuz here" <[EMAIL PROTECTED]> To: Sent: Thursday, January 17, 2008 9:14 AM Subject: [jQuery] Re: clone help > $('#$id').remove().clone(true).appendTo('

[jQuery] Re: clone help

2008-01-17 Thread KidsKilla .grin! wuz here
$('#$id').remove().clone(true).appendTo('#verticals'); is wrong. because of remove() (it kills everything because of memory IE leaks). you sould use this chain instead: $('#$id').appendTo('#verticals'); or somethin like that: $('#$id').hide().bla-bla.appendTo('#verticals').show(); 2008/1/17, Li

[jQuery] Re: clone help

2008-01-17 Thread Karl Swedberg
Hi Lionel, It looks like you replied to another email message to this group and simply changed the subject line. Unfortunately, people who use a "thread view" in their email programs may ignore your message because it will appear in the same "thread," or group, of messages that they've a