Is there any difference between body onload() and document.ready() function?
Answer / 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 |
How to increase cursor size in html body using jquery?
What happen if you return false from a jQuery event handler?
Can you use any other name in place of $ (dollar sign) in jQuery?
What are the advantage of using cdn? : jquery mobile
What is event.PreventDefault in jQuery?
How to submit a form without submit button using jquery?
Which one is more efficient, document.getelementbyid( "idname") or $("#idname)?
What is the basic requirement to start with the jquery?
How can you use a jquery library in your project?
What is the difference between event.stopPropagation and event.stopImmediatePropagation?
Can we call C# code behind using jQuery?
What is the use of jquery.data()?