Hi Does anyone have a script or know how to load iframe content content after the rest of the page has loaded.
Thanks in advance ashley
Hi Does anyone have a script or know how to load iframe content content after the rest of the page has loaded.
Thanks in advance ashley
window.onload = function() {
document.getElementById('my-iframe').src = 'http://www.example.com';
};
<iframe id="my-iframe">It's 2010, GTFO!</iframe>
BTW, please don't use that alternate content in the example above :P
For the jQuery lovers out there too...
$(window).load(function() {
$('#my-iframe').attr({ src: 'http://www.example.com' });
});