How to move an element around DOM tree without affecting related javascript? -


In this case I have an iframe that has an editor, mooEditable. I clone the element with the ID, destroy the old one and insert a new one where it is needed.

JavaScript component no longer works at this level. If there is a normal way of doing this, then it will be great if you share it.

TIA

Maybe you can show a summary of what you do? Specifically, what does "destroy the old one" mean?

It uses jQuery, but if you want you can code bare metal:

  var item = $ ('# luggage ID') ; Items to move // ​​var to $ ('# new-div'); // container to get it item.remove (); Want.append (item);  

You may have problems moving the iframes (not sure). If so, and if you are just swapping two items, then move the other.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -