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
Is it possible to use jquery to make ajax request? : jquery mobile
How we can hide a block of html code on a button click using jquery?
How to get the value of selected option in jquery?
Differentiate between jquery.size and jquery.length? : jQuery Mobile
What is eq()? : jquery mobile
What are the browser related issues for jQuery?
Whether we need to add jQuery file in both Master and Content page?
What is jquery selectors? Give some examples.
What is difference between sorting string array and sorting numerical array in jquery?
How to programmatically trigger a click event thats being handled by jquery only?
How to prevent Right Click option using jquery?
What is the advantage of using the minified version of jquery rather than using the conventional one?
How we can modify the css class in jquery?
What is cdn and how jquery is related to it?
What are the two types of CDNs?