Delaying jQuery Document Ready Execution

If your using jQuery 1.6 or higher you can use holdReady() method to delay the ready event being fired. This method allows the caller to delay jQuery's ready event .
$.holdReady( true ); // Start holding $.getScript ( "myscript.js", function() { $.holdReady( false ); //Release the holding });
To delay the execution , first call $.holdReady( true ). When the ready event should be released to execute, call $.holdReady( false ) . Multiple holds can be put on the ready event, one for each $.holdReady(true) call. The ready event will not actually fire until all holds have been released with a corresponding $.holdReady(false) and the normal document ready conditions are met.