How to move iframe along the DOM without losing it's content?
- by Beck
Is it possible?
I have tried to move it, but iframe contents dissapear.
Tried to get contents of iframe and place them in the new place but all handlers ofc dissapear.
Tried to do the same, but with new jQuery 1.4.2 feature, that clones all events along with it.
But it doesn't work :)
So I have decided to ask here for help.
How to move the damn iframe to another place in the document without losing it's contents? ^_^
Thanks
Added:
txtad_iframe = ad_container.find('iframe');
its_contents = txtad_iframe.contents();
its_body = its_contents.find("div:first").clone(true).insertAfter(cthis.find('#photos'));
new_ad.append(its_body);
Here i'm trying to copy contents to new ad container. But it doesn't work. Context banner doesn't react on click event.
I have tried to move ad_container to container, but iframe body content dissapears.