adspace
Is it possible to hold or delay document.ready execution for sometime?
Answer Posted / 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 |
Post New Answer View All Answers
Do you have plans for a new jquery plug-in or something else we should look out for? Where to from here for the imgpreview plugin?
How to validate email using jquery?
What is the minimum setup needed to start using jquery.
How do you install/use jquery in a project. What is the minimum setup needed to start using jquery.
How can jquery library be added to pages?
How to always reference latest version of jquery?