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
Tell me what does dollar sign ($) means in jquery? : jquery mobile
Is jquery a framework?
How do you get the text value of a selected option?
How to submit a form without submit button using jquery?
What is jquery.size()? : jquery mobile
What is the difference between $(this) and 'this' in jquery?
What is the method used to define the specific character in place of $ sign?
How to use migrate jquery plugin if possible? : jquery mobile
How can you disable jquery animation?
Why do we use jquery? : jquery mobile
Is jquery library used for server scripting or client scripting?
When can you use jquery?
Explain the script build up by jquery?
How to multiple version of jQuery?
Which command will give a version of jQuery?