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 get the type of arguments passed to a function?
What is method chaining in jquery?
Is it possible to use our own specific character in the place of $ sign in jquery? : jquery mobile
What is the latest version of jquery?
Explain deferred and promise object in jquery? : jquery mobile
Explain .on()? : jquery mobile
How we can select multiple elements in jquery?
What is jquery datepicker in jquery?
Explain the basic need to start with jquery? : jquery mobile
Why jQuery is better than JavaScript?
What is each() function in jQuery? How do you use it?
How to load a page using jquery mobile? : jquery mobile
How to programmatically trigger a click event that's being handled by jquery?
Define bind() and unbind elements in jQuery?
What is a cdn? : jQuery Mobile