Move div into another div, which is located inside iframe

What's the way to move #content into the #wrapper?

index.html

<iframe id="my-iframe" src="./iframe.html"></iframe>
<div id="content"><p>content</p></div>

iframe.html

...
<div id="wrapper"></div>
...

The desired result:

...
<div id="wrapper">
    <div id="content"><p>content</p></div>
</div>
...

Both plain JS and jQuery will be okay, although plain JS is a bit preferably.

Answers 1

Related Articles