Skip to content

Instantly share code, notes, and snippets.

@ralphholzmann
Created November 4, 2010 19:36
Show Gist options
  • Save ralphholzmann/663043 to your computer and use it in GitHub Desktop.
Save ralphholzmann/663043 to your computer and use it in GitHub Desktop.
Allows you to bind to jQuery.ready before jQuery has been loaded
// Bind functions to dom ready before jQuery has been loaded
// This only works if line 83 from jQuery 143 is changed from
// readyList = [],
// to
// readyList = window.jQuery.readyList || [],
(function(){
jQuery = $ = function( fn ) {
return typeof fn === "function" ?
jQuery.readyList.push( fn ) :
{ ready : arguments.callee };
};
jQuery.readyList = [];
}).call(window);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment