JSFiddle - React, Tailwind, and code Playground
HTML
<div id="mover" onClick="swapFrames()">move</div>
<div id="wrap1">
<iframe id="iframe1" src="http://matthart.com/1.htm"></iframe>
</div>
<div id="wrap2">
<iframe id="iframe2" src="http://matthart.com/1.htm"></iframe>
</div>
CSS
#mover {
cursor:pointer;
}
JavaScript
function swapFrames() {
var w1 = document.getElementById('wrap1');
var w2 = document.getElementById('wrap2');
var f1 = w1.querySelector('iframe');
var f2 = w2.querySelector('iframe');
w1.removeChild(f1);
w2.removeChild(f2);
w1.appendChild(f2);
w2.appendChild(f1);
//f1.parentNode = w2;
//f2.parentNode = w1;
//alert(f1.parentNode.id);
}