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
What is the purpose of jquery?
Explain how jquery works?
How to control page titles in jquery mobile? : jquery mobile
Explain the difference between jquery-x.x.x.js and jquery.x.x.x min.js?
What is slice() method in jquery?
What to do to select element having a particular class (".selected")? : jquery mobile
Why we need jquery mobile? : jquery mobile
How to multiple AJAX requests be run simultaneously in jQuery?
Is jquery is json library file or a javascript?
How to use css() in jquery?
Is jQuery is a client or server scripting?
What are selectors in jquery? Explain
What is the difference between $(window).load and $(document).ready function in jquery?
What is resize() function in jquery?
How can you select all elements in a page using jquery?