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 |
What is method chaining in jquery?
Difference between find() and closest() in jquery?
Tell me what is the use of .size() method in jquery?
What is the difference between text() and html() in jquery?
Is it possible to use other client side libraries like MooTools, Prototype along with jQuery?
What is the between $(this) and 'this' in jquery?
How can you add a jquery library in your project?
Explain finish method in jquery? : jquery mobile
What is jQuery CDN?
How to debug jquery code/ debug jquery?
What is the difference between onload() and document.ready()?
When can jquery be used?