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 can you get the type of arguments passed to a function?
What is finish method in jQuery?
How can images be made to appear scrolling one over another?
What is the use of html() method in jquery?
What does dollar sign ($) me in jquery?
How to write cookies in jquery?
What are the four parameters used for jQuery Ajax method?
How do you check if an element is empty?
How you will use jquery means requirement needed for using jquery.
Explain .siblings() method in jquery?
What are selectors in jquery? : jQuery Mobile
What does jQuery data() function do?