Thursday 6 June 2013

What is jQuery.holdReady() function?

-By using jQuery.holdReady() function we can hold or release the execution of jQuery’s ready event.

-This method should be call before we run ready event.

-To delay the ready event, we have to call

jQuery.holdReady(true);

-When we want to release the ready event then we have to call

jQuery.holdReady(false);

-This function is helpful when we want to load any jQuery plugins before the execution of ready event.

For example

$.holdReady(true);
$.getScript("xyzplugin.js", function() {
$.holdReady(false);

No comments:

Post a Comment