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
What is jquery a client or server scripting?
How to execute jQuery code after the DOM is ready?
Define the use of each function in jquery?
Mention the differences between javascript and jquery.
Can you write a code to select all links inside the paragraph?
Tell me what does dollar sign ($) means in jquery? : jquery mobile
Why is jquery better than javascript?
Tell me how to select combobox select value and text using jquery?
How to run an event handler only once in jQuery?
Is jQuery is a client or server scripting?
Can you use any other name in place of $ (dollar sign) in jQuery?
Explain the use of data-role=”page” attribute? : jQuery Mobile
What are the various ajax functions available in jquery ?
Define data paremeter of jquery ajax method?
What is .siblings() method in jquery?