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
What is jQuery connect?
How can you add a jquery library in your project?
Explain the difference between .empty() and .remove() ?
What is method chaining in jquery and what are the advantages?
How you get server response from an ajax request using jquery?
What is the difference between text() and html() in jquery?
Is jquery a w3c standard? : jquery mobile
What is the difference between $.map and $.grep in jQuery?
How do you select all elements with the class of “selected” in jquery?
How does jquery mobile theming work? : jquery mobile
What is the difference between map and grep function in jquery?
Tell me is jquery a library for client scripting or server scripting? : jquery mobile
Explain the types of selectors in jquery?
Explain cdn? : jquery mobile
How to disable/enable an element with jQuery?