> Anyway, why a clone() affects the object. Cloning should only create a 
> copy object, not affect the state of the original one.
>  
I think it is because you may want to chain methods on the cloned object.

If clone() does not substitute the cloned object with the original one, 
you could not call methods on it, as the underlaying object would remain 
the original one.

Anyway clone() does not modify the original DOM element. It just switch 
the DOM element in your jquery object.

Another cause of apparent bug is that you clone an object leaving it 
with the same id of its source. After cloning, you should change the id 
of the copy or you will be unable to select the original object again.

If you want to keep a reference to the original jQuery object, Jorn 
suggestion is perfect.

Renato

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to