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
explain bind() vs live() vs delegate() methods in jquery
Define the use of each function in jquery?
What is the struts2 jquery plugin and its advantages.
How can related code be encapsulated?
What is .bind()? : jquery mobile
How to debug jQuery?
How can you delay document.ready until a variable is set?
Explain jquery filter?
How to find all sibling elements in front of the current element using ?
What is the difference between map and grep function in jquery?
How did you become the creator of jquery ui? Whats the story behind that?
Is jQuery a programming language?
Explain cdn in jquery?
What is the use of jQuery.ajax method ()?
Why should I use jquery?