Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Using document.readyState to see if the DOM is ready
var timer = setInterval( function()
if ( /loaded|complete/.test( document.readyState ) )
clearInterval( timer );
// go!
}, 10 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment