Is there any difference between body onload() and document.ready() function?
Answer Posted / chaitanya
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.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to concatenate two strings using jquery?
What is the difference between size and length of jQuery?
Difference between find() and closest() in jquery?
Explain the use of data-role=”page” attribute? : jQuery Mobile
What is a jquery ?
What are the guidelines for an application to follow the principles of progressive enhancement.
What is the difference between $(window).load and $(document).ready?
What is jquery.length? : jquery mobile
How can we add change font size using jquery?
Explain the difference between .js and .min.js?
What is the difference between onclick and onsubmit?
Explain the concepts of "$ function" in jquery with an example?
Why we use chaining in jquery?
What are the features of jQuery, has been used in web applications?
Explain the use jquery.data method?