• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Klong Designs

Klong Designs

Wordpress Designer, Developer and Web Programmer

  • Home
  • About
  • Services
    • WordPress
      • Theme Design
      • Plugin Tweaks
      • Site Migrations
    • Graphic Design
    • Custom Programming
      • Responsive Design
    • SEO
  • Articles
    • Facebook
    • HTML
    • jQuery
    • PHP
    • WordPress
  • Contact/Quote Request

jQuery: Ready vs Load

August 23, 2013 By Chris Klongpayabal

jQuery is a thing of beauty. There are so many things that can be done with jQuery that it’s a shame that more people don’t use it. One question I’ve seen asked over and over again is what’s the difference between $(document).ready and $(window).load?  I’m sure that there’s more to it than this, but here’s my quick explanation of it:

ready-vs-load-full

$(document).ready – This function will fire once all of the html elements have been loaded. Once all tags have been loaded, then this will fire.

$(window).load – This function will fire once EVERYTHING is ready. This basically means once all the images have been loaded.

The main difference that I’ve found is that $(document).ready  fires before any resources have been loaded (just the DOM elements have been added) and $(window).load fires once everything is done.

So when do you use each? If you the jQuery you are running requires you to fix/adjust any image attributes (like width, height, etc.), then you’ll need to use the $(window).load function. If you are just adjusting the dom elements, then you can use $(document).ready.

There is an exception to the image attributes. If you define the width and height of an image (either in CSS or inline), then you can use $(document).ready and access those attributes.

Primary Sidebar

Quick Quote

Footer Quote

Footer

Services

Graphic Design - This includes (but is not limited to) logos, banners, signs, posters, business cards, rack cards, brochures, flyers, and postcards.
Website Design - This includes (but is not limited to) theme design, logo design, banner ads, post graphics, pinterest-based images, image maps and navigation design.
Website Programming - This includes (but is not limited to) HTML, CSS, Javascript, PHP, jQuery, SCSS and LESS, as well as MVC frameworks, Theme updates and tweaks, plugin updates and tweaks, Multisite setup, plugin design and customization.
SEO Work - This includes (but is not limited to) analytics review, site SEO review, video SEO, ongoing SEO updates, sitemap setup and goal tracking.
Maintenance Work - This includes (but is not limited to) Keeping WordPress up-to-date, running backups of your site and database, and answering any questions you have about your site.
If you would like more information, please fill out the quick quote form. Thanks!

Follow

A Few Client Sites

  • 5 Dollar Dinners
  • Get Rich Slowly
  • The Happy Housewife
  • I Save A2Z
  • Hip Homeschool Moms
  • Redefined Mom
  • Queen Bee Coupons
  • More with Less Today
  • Saving Advice
  • One Crazy Mom

Copyright © 2025 · Klong Designs