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 |
Why we use chaining in jquery?
Does jQuery 2.0 supports IE?
Where jQuery code is getting executed?
In what scenarios jQuery can be used?
Can we have multiple document.ready() function on the same page? : jquery mobile
How to read, write and delete cookies in jquery?
What are the features of jQuery, has been used in web applications?
What are the advantages of minified version of jquery?
Do we need to add the jquery file both at the master page and content page as well?
Is jQuery a library for client scripting or server scripting?
What are the popular jquery cdn? : jquery mobile
How to get the server response from an ajax request using jquery?