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 can jquery library be added to pages? Write a basic jquery code?
What is the use of serialize method in jQuery?
Write a basic jquery code?
How to use migrate jquery plugin if possible? : jquery mobile
How we can modify the css class in jquery?
What are selectors in jquery mean ?
How to check/uncheck an input in jquery?
Is jquery a w3c standard? : jquery mobile
Explain the difference between javascript and jquery? : jquery mobile
How can images be made to appear scrolling one over another?
What is serialize() in jquery?
Is it too early to discuss jquery ui 1.8?
Explain "beforesend(xhr)" paremeter of jquery ajax method?
Explain the features of jquery?
How we can hide a block of html code on a button click using jquery?