Home > DeveloperSection > Interviews > Does document.ready() function similar to onload()?

Posted on    October-17-2011 1:48 AM

 JQuery JQuery 
Ratings:
 1 Answer(s)
  2154  View(s)
Rate this:

Arun Singh

Total Post:310

Points:1550
Posted on    October-17-2011 12:00 AM

Document.ready() function is completely different from body onload() function .

  • First of all Document.ready() function is called as soon as DOM is loaded but body.onload() function is called when everything gets loaded on the page that includes DOM, images and all associated resources of the page.
  • We can have as many document.ready() functions in a page but onload function is limited on one time.

Don't want to miss updates? Please click the below button!

Follow MindStick