Learning Horizon | For Learners

ASP.NET, SQL SERVER, JQUERY,JAVASCRIPT, WEBSPHERE

Thursday 18 April 2013

Holding document.ready() using jQuery.holdReady() function

Today in this tutorial we will learn about an important function holdReady() of Jquery. I was searching about Jquery on Google and I found it informative for me and I decided it to post this article.

We can hold or release the execution of jQuery’s ready event by using jQuery.holdReady() function.This method should be call before we run ready event.To delay the ready event, we need to call jQuery.holdReady(true);

Whenever we want to release the ready event then we need to call jQuery.holdReady(false);

UseFull Scenario:-


Whenever we want to load any Jquery plugins before the execution of ready event.

Example : -


$.holdReady(true);

$.getScript("abcplugin.js", function() {

$.holdReady(false);

});

Hope it will be informative and helpfull for you.

2 comments:

Please do not enter spam links.