
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
When to Use Document Ready and When Window Load in jQuery
$(window).load()
Use $(window).load(), when you want the code inside it to run only once the entire page is ready (not only DOM). It executes when the page is fully loaded, including frames, objects and images
Note: The load() method deprecated in jQuery version 1.8. It was completely removed in version 3.0. To see its working, add jQuery version for CDN before 3.0.
$(document).ready()
Use the $(document).ready() method when you want the code inside it to run once the page DOM is ready to execute JavaScript code.
Advertisements