Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Aug 2014
    Location
    Athens, Greece
    Posts
    80

    Do u know the difference between jquery $(document).ready and $(window).load ???

    I thought, that there is no difference between these two. That both work and do stuff,
    when the page has loaded. WRONG!!!
    $(document).ready work when the DOM is ready.
    That means that can be executed even when the pictures have NOT been loaded, cause the DOM is ready (the structure of the page and its elements)
    But, when you need to do something, when EVERYTHING has loaded,
    comes the $(window).load.
    I found it out, when i needed to pass a javascript variable at the start of the page, and do something with that. I made it with $(document).ready and $(window).load

    I found also this relative article. Check it out!
    https://4loc.wordpress.com/2009/04/2...vs-windowload/

  2. #2
    Senior Member
    Join Date
    Jul 2015
    Location
    Brooklyn, USA
    Posts
    169
    thanks for the information sharing with us.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

  Find Web Hosting      
  Shared Web Hosting UNIX & Linux Web Hosting Windows Web Hosting Adult Web Hosting
  ASP ASP.NET Web Hosting Reseller Web Hosting VPS Web Hosting Managed Web Hosting
  Cloud Web Hosting Dedicated Server E-commerce Web Hosting Cheap Web Hosting


Premium Partners:


Visit forums.thewebhostbiz.com: to discuss the web hosting business, buy and sell websites and domain names, and discuss current web hosting tools and software.