0

I was just wondering, how I could delay iframe load by 5 seconds? I only know html and css so far, and don't have time, atleast this year to start javascript.

Anyway, for a website I'm working on, I need iframe to load after 5 seconds. Any help would be well appreciated.

Thank you!

Miqro
  • 467
  • 1
  • 8
  • 14
  • Possible duplicate of [Delay load of iframe?](http://stackoverflow.com/questions/1587523/delay-load-of-iframe) – eush77 Nov 21 '15 at 20:32

1 Answers1

2

you will need to use Javascript, say in your html file:

<iframe id="myIframe"></iframe>

<script>
    window.setTimeout(function () {
        var iframe = document.getElementById('myIframe');
        iframe.setAttribute('src', 'http://...');
    }, 5000);    
</script>
Natural Lam
  • 732
  • 4
  • 13
  • Thank you. But it wont load? Here is jsfiddle example I tried: https://jsfiddle.net/6ysa72cb/ – Miqro Nov 21 '15 at 20:10
  • www.google.com block loading within a iframe if it's not under the same origin, change your url to https://jsfiddle.net – Natural Lam Nov 21 '15 at 20:17