DOM - Move element?
I am creating a web app and I want to be able to move an object to another spot.
Right now what I have done is copy the html of the old one, insert it to the end of the node I want, then delete the old one.
As a result, I lose events/observers that have been applied (i.e. for double clicking, dragging, etc.)
Edit: I also have boxes in the element I wanna copy, so if I just get the HTML I lose their values too. If there is some way to copy the whole object, with the "correct" values, applied events, etc.. that would be WONDERFUL!
SonicMailer Pro - Professional mailing list manager & award-winning email marketing software
Download a FREE 30-day trial today!
Use coupon savemoreon4 and save 10%!
Triexa.com posted this at 03:48 — 21st December 2006.
They have: 173 posts
Joined: Feb 2005
I got the solution on another forum... using removeChild returns the object... so I can just use that and insert it elsewhere
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.