javascript - Delay load of iframe? -
I know there are some tools and techniques to delay loading javascript, but I have an IFrame that I delay I want to download and rendering (iframe is a hidden, which will not be visible until a particular tab is clicked on a page, it is loading.) To delay the loading of an iframe Is there any way? Thanks for any suggestions!
It's easy with jquery!
Either attach your code to $ ( ) Loads iframe within
or use $ (document) .ready (function () {})
These are both the same and DOM is ready after your code! < / P>
For example
$ (document) .ready (function () {$ ('iframe # iframe_id'). Attr ('src', 'iframe_url'); });
See more
Comments
Post a Comment