DOES DOCUMENT.READY() FUNCTION SIMILAR TO ONLOAD()?

Arun Singh

Total Post:310

Points:1550
Posted by  Arun Singh
JQuery 
 2409  View(s)
Ratings:
Rate this:
  1. Arun Singh

    Post:310

    Points:1550
    Does document.ready() function similar to onload()?

    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.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!