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 |
Jumping off of jquery ui for a second, do you 'release early, release often' with all of your projects? What are your thoughts on that strategy?
How to validate phone number using jquery?
What is the use of noconflict() method in jquery?
Back onto jquery ui' can you see jquery ui making more of an impression in the future, lead by the current successes of jquery?
Explain jquery filter?
What is event.PreventDefault in jQuery?
What is the slowest selector in jQuery?
How to create, read and delete cookies with jquery?
Why is the block display style used for animations?
How can related code be encapsulated? Give example.
What are selectors in jquery? : jQuery Mobile
How jQuery selectors are executed?