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
JQuery or JavaScript which is quicker in execution?
What is the difference between onload() and document.ready() function used in jquery?
What is jquery datepicker in jquery?
Explain the use jquery.data method?
Explain the basic need to start with jquery? : jquery mobile
What is resize() function in jquery?
How can related code be encapsulated?
What are jquery selectors?
Why is only the first page of multi page document loaded? : jquery mobile
How to write cookies in jquery?
How can I select 20th div with jquery?
Is vanilla js faster than jquery?
Define the use of each function in jquery?
How can you disable jquery animation?
Which one is more efficient, document.getElementbyId( "myId") or $("#myId)?