jQuery Tutorial plus Question:
Explain the difference between onload() and document.ready() function used in jQuery?
Answer:
We can add more than one document.ready() function in a page.
we can have only one onload function.
Document.ready() function is called as soon as DOM is loaded.
body.onload() function is called when everything (DOM, images)gets loaded on the page.
we can have only one onload function.
Document.ready() function is called as soon as DOM is loaded.
body.onload() function is called when everything (DOM, images)gets loaded on the page.
Previous Question | Next Question |
How you get server response from an AJAX request using Jquery? | Why we need jQuery? |