$(document).ready() != $(window).load()

Here’s a short one:

$(document).ready(function() {
  // or its shorter $(function() { });
  // I'll wait for the DOM to load
});

is not the same as

$(window).load(function() {
  // I'll wait for the content (like images) as well.
});

So choose wisely.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.