jQuery Mobile Question:

Can you please explain the difference between body onload() and document.ready() function?

Tweet Share WhatsApp

Answer:

Document.ready() function is different from body onload() function for 2 reasons.
► We can have more than one document.ready() function in a page where we can have only one body onload function.
► Document.ready() function is called as soon as DOM is loaded where body.onload() function is called when everything gets loaded on the page that includes DOM, images and all associated resources of the page.

Download jQuery Mobile PDF Read All 77 jQuery Mobile Questions
Previous QuestionNext Question
Explain jQuery.noConflict?Can you please explain the difference between .js and .min.js?