Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Tip: Good Alternative to $().ready in jQuery

Use this alternative to ease potential browser hang with jQuery functions.


advertisement

jQuery developers often use $().ready or $(document).ready to initialize jQuery functions after the HTML page has loaded. However, it is fired when the HTML objects are still being downloaded by the browser. This can cause the browser to hang at times.

A good alternative is to use the window.load event to initialize the functions.

$(window).load(function()
{
} 

 

Visit the DevX Tip Bank

 





   
Srinath M. S. says: "I would love to leave a footprint in this flat world."
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date