Is it possible to hold or delay document.ready execution for sometime?
Answer / chaitanya
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.
Hide Copy Code
$.holdReady(true);
$.getScript("myplugin.js", function() {
$.holdReady(false);
});
| Is This Answer Correct ? | 0 Yes | 0 No |
Tell me how to use migrate jquery plugin if possible? : jquery mobile
Differentiate between width() vs css(‘width’) in jquery
What is the use of delay() method in JQuery?
Explain slidetoggle() effect.
Tell me is jquery a w3c standard? : jquery mobile
How can we apply css in div using jquery?
Explain .delegate()? : jquery mobile
What are source maps in jQuery?
How to revert the most recent ‘destructive’ operation, changing the set of matched elements to its previous state using ?
What is $() in jquery?
Explain the difference between event.preventdefault and "return false"? : jquery mobile
Difference between prop() and attr()? : jQuery Mobile