Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > Javascript

Notices


 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 01-19-2016, 12:03 AM   #2
techvalens
Registered User
 
Join Date: Nov 2015
Posts: 1
difference between jquery $(document).ready and $(window).load

document.ready is a jQuery event, it runs when the DOM is ready, e.g. all elements are there to be found/used, but not necessarily all the content.
window.onload fires later (or at the same time in the worst/failing cases) when images and such are loaded. So, if you're using image dimensions for example, you often want to use this instead.
techvalens is offline   Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:19 PM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.