Created
August 24, 2015 12:28
-
-
Save edgarberm/f0a1917bd730340baad7 to your computer and use it in GitHub Desktop.
Check if everything has fully loaded in our document
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var everythingIsLoaded = setInterval( function () { | |
if ( /loaded|complete/.test( document.readyState ) ) { | |
clearInterval( everythingIsLoaded ); | |
// Initialize our code.. | |
} | |
}, 10 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment