Skip to content

Instantly share code, notes, and snippets.

@jed
Forked from tobie/gist:842085
Created February 25, 2011 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jed/843289 to your computer and use it in GitHub Desktop.
Save jed/843289 to your computer and use it in GitHub Desktop.
var domReady = !document.readyState && document.addEventListener
? function( fn ){ document.addEventListener( "domContentLoaded", fn ) }
: function( fn ){ setTimeout( /in/( document.readyState ) ? function(){ domReady( fn ) }, 50 ) : fn ) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment