JQuery Developer Question:

Download Job Interview Questions and Answers PDF

Can you please explain the difference between onload() and document.ready() function used in jQuery?

JQuery Developer Interview Question
JQuery Developer Interview Question

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.

Download JQuery Developer Interview Questions And Answers PDF

Previous QuestionNext Question
How to get server response from an AJAX request using Jquery?Do I need to add the JQuery file both at the Master page and Content page as well?