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 |
What is a jquery ?
What to do to select element having a particular class (".selected")? : jquery mobile
What are the fastest selectors in jQuery?
What are the different ways of using $.connect function in jquery?
How to set jquery mobile responsive table width to 100% width despite css styles? : jquery mobile
What is normally not included in a cloned copy? : jQuery Mobile
How is body onload() function is different from document.ready() function used in jquery?
Which program is useful for testing jQuery?
What is the basic requirement to start with the jquery?
How to give face effect in jquery?
Can we add more than one ‘document.ready’ function in a page?
What are selectors in jquery? : jQuery Mobile