JSFiddle - React, Tailwind, and code Playground
HTML
<div id="iframecontainer">
<iframe></iframe>
<div id='button'></div>
</div>
CSS
body{
margin:0; background:#555;
}
#iframecontainer{
display:none; height:250px; width:250px; background:#fff;
border:1px solid #555; box-shadow:2px 2px 40px #222;
margin:0 auto; position:relative;
}
#iframecontainer iframe{
width:250px; height:250px; border:0;
}
#button{
height:250px; width:250px; position:absolute; top:0; left:0;
}
JavaScript
$(document).ready(function(){
var ifc = $('#iframecontainer'), ifr = ifc.find('iframe');
var btn = $('#button');
ifc.fadeIn('slow', function(){
ifc.css('background', "url('http://www.calgaryramsrugby.com/images/ajax-loader.gif')");
ifr.attr('src', 'http://coinurl.com/get.php?id=22615').load(function(){
ifc.css('background', '#fff');
btn.click(function(){
ifc.hide();
alert("Can't find attributes in iframe through JavaScript without CORS access");
});
});
});
btn.mouseover(function(){
btn.css('cursor', 'pointer');
});
});