Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

JQuery or JavaScript which is quicker in execution?

811


What is the difference between onload() and document.ready() function used in jquery?

1139


What is jquery datepicker in jquery?

852


Explain the use jquery.data method?

849


Explain the basic need to start with jquery? : jquery mobile

747


What is resize() function in jquery?

915


How can related code be encapsulated?

833


What are jquery selectors?

822


Why is only the first page of multi page document loaded? : jquery mobile

754


How to write cookies in jquery?

4005


How can I select 20th div with jquery?

796


Is vanilla js faster than jquery?

793


Define the use of each function in jquery?

763


How can you disable jquery animation?

834


Which one is more efficient, document.getElementbyId( "myId") or $("#myId)?

828