JQuery Programmer Question:

What is the difference between onload() and document.ready()?

Tweet Share WhatsApp

Answer:

In a page, we can have only one onload function but we can have more than one document.ready function. Document.ready function is called when DOM is loaded but onload function is called when DOM and images are loaded on the page.

Download JQuery Programmer PDF Read All 201 JQuery Programmer Questions
Previous QuestionNext Question
What are the features of jQuery, has been used in web applications?How to search for descendent elements that match the specified selectors using jQuery?