Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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