JSFiddle - React, Tailwind, and code Playground
by jeffreydev
HTML
<div>
<a href="http://google.com">Google</a>
</div>
<div id="content">
</div>
CSS
iframe
{
width: 800px;
height:400px;
border:solid 4px black;
}
#content
{
background: green;
}
JavaScript
$(document).ready(function(){
$("a").hover(function(){
//create iframe and append to div#content
var href = $("a").attr("href");
$("<iframe src='"+href+"' style=\"visability: hidden;\" onload=\"$(this).css('visability', '');\"></iframe>").appendTo("#content");
},
function(){
$("#content").empty();
}
);
});