Home > DeveloperSection > Forums > Difference between onload() and document.ready()
jayprakash sharma
jayprakash sharma

Total Post:117

Points:821
Posted on    December-04-2012 1:32 AM

 JQuery JQuery 
Ratings:


 1 Reply(s)
 980  View(s)
Rate this:
Hi every one,
can you tell me what are difference between onload() and document.ready() function used in jQuery?

Thanks


AVADHESH PATEL

Total Post:604

Points:4228
Posted on    December-04-2012 7:39 AM

Hi Jayprakash,
Your solution is

  1.     We can add more than one document.ready() function in a page.
  2.     we can have only one onload function.
  3.     Document.ready() function is called as soon as DOM is loaded.
  4.     body.onload() function is called when everything (DOM, images..)gets loaded on the page.

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

Follow MindStick