Yes, its possible. With Release of jQuery 1.6, a new method “jQuery.holdReady(hold)
” was introduced. This method allows to delay the execution of document.ready()
event. document.ready()
event is called as soon as your DOM is ready but sometimes there is a situation when you want to load additional JavaScript or some plugins which you have referenced.
$.holdReady(true);
$.getScript("myplugin.js", function() {
$.holdReady(false);
});