jquery wait for dom event code example
Example 1: document jquery
$(function(){
// equal to $( document ).ready(function() {
});
Example 2: deny ready jquery
$.holdReady( true );
$.getScript( "myplugin.js", function() {
$.holdReady( false );
});