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 |
What is the difference between $(this) and 'this' in jquery?
How to read cookies in jquery?
What are the difference between empty(), remove() and detach() functions in jquery?
How we can get the value of a radio button using jquery?
How to check data type of any variable in jQuery?
Can you include multiple version of jQuery? If yes, then how they are executed?
How to programmatically trigger a click event thats being handled by jquery only?
Tell me how to use migrate jquery plugin if possible? : jquery mobile
Why do we need to go for JQuery?
How to find all sibling elements in front of the current element using ?
What is difference between $(this) and ‘this’ in jquery?
What are the methods used to provide effects in jquery?