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 |
How to include jQuery in ASP.Net project?
Which is the latest version of jQuery library?
Do you know what is the use of jquery.data()?
How to executed jquery selectors? : jquery mobile
What is the use of .size() method in jquery?
How we can modify the css class in jquery?
Difference between document.ready and window.onload? : jQuery Mobile
What is jQuery connect?
How do you attach a event to element which should be executed only once?
How to create clone of any object using jQuery?
How to programmatically trigger a click event thats being handled by jquery only?
What is jQuery plugin and what is the advantage of using plugin?