JSFiddle - React, Tailwind, and code Playground
by Avi Algaly
HTML
<div class="hidden_element">
<iframe data-src="http://www.algomizer.com"></iframe>
</div>
<p>Our element will be made visible 5 seconds after load...</p>
CSS
.hidden_element { display: none }
JavaScript
setTimeout(function(){
// Show our element, then call our callback
$(".hidden_element").show(function(){
// Find the iframes within our newly-visible element
$(this).find("iframe").prop("src", function(){
// Set their src attribute to the value of data-src
return $(this).data("src");
});
});
$("p").remove();
}, 5000);