Skip to content

Instantly share code, notes, and snippets.

@stephnr
Created June 30, 2014 14:28
Show Gist options
  • Save stephnr/e6e2c9fcd6ab4a910e25 to your computer and use it in GitHub Desktop.
Save stephnr/e6e2c9fcd6ab4a910e25 to your computer and use it in GitHub Desktop.
Custom DomReady Script
// Custom Dom Ready Function Script
function f() {
// Do Something
}
function r(f){/in/.test(document.readyState)?setTimeout('r('+f+')',9):f()}
// Credit: http://www.dustindiaz.com/smallest-domready-ever
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment