JSFiddle - React, Tailwind, and code Playground
by Scoobler
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/base/jquery-ui.css">
The page in a div:<br/>
<div id="contents" class="content">Testing....</div>
<br/><br/>
<input type="button" id="replace" value="Replace Div Contents"/>
CSS
.content{
border: red solid 1px;
width:100%;
}
JavaScript
$('#replace').click(function() {
var class=$('#contents').attr('class');
$("#contents").replaceWith('<iframe class="' + class + '" src="http://www.google.co.uk"></iframe>');
}).button();