Skip to content

Instantly share code, notes, and snippets.

@bdelespierre
Created June 6, 2013 12:35
Show Gist options
  • Select an option

  • Save bdelespierre/5721169 to your computer and use it in GitHub Desktop.

Select an option

Save bdelespierre/5721169 to your computer and use it in GitHub Desktop.
DOMReady event, quick'n'dirty.
(function domReady (callback) {
!/in/.test(document.readyState)
? setTimeout(function () { domReady(callback) }, 1000)
: callback();
})(function () {
console && console.log('dom is ready');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment