Created
August 12, 2011 12:46
-
-
Save shawndumas/1141959 to your computer and use it in GitHub Desktop.
Cross Browser DOMReady
This file contains 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
// http://www.dustindiaz.com/smallest-domready-ever | |
var ready = function (f) { | |
(/complete|loaded|interactive/.test(document.readyState)) ? | |
setTimeout('ready(' + f + ')', 9) : | |
f(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment