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
How can you delay document.ready until a variable is set?
Please tell us that is jquery knockkout intended to compete with jquery or prototype or work with it?
Define type paremeter of jquery ajax method?
How to revert the most recent ‘destructive’ operation, changing the set of matched elements to its previous state using ?
How can images be made to appear scrolling one over another?
How we can select multiple elements in jquery?
What is the difference between $(window).load and $(document).ready?
Can you write a code to select all links inside the paragraph?
Can you use any other name in place of $ (dollar sign) in jQuery?
What is the difference between onclick and onsubmit?
How do you check or uncheck a checkbox input or radio button?
What is the difference between $(this) and 'this' in jquery?
How to create, read and delete cookies with jquery?
How to disable/enable an element in jquery?
What is method chaining in jquery and what are the advantages?