title: window.load and document.ready still waiting for DOM
body: <p>In my case, I need to check the height of images (100% width). </p>
  
  <pre><code>  $(window).load(function() {    
      var heightImage = $('ul.images li[style*="display: list-item"] img').height();
      $(window).resize(function() {
        var heightImage = $('ul.images li[style*="display: list-item"] img').height();
        $('ul.images').css("height", heightImage + "px");
      }).resize();
    });
  </code></pre>
  
  <p>With that method of <code>.load</code> function, it waits for all contents ready loaded after finally it check the height of the images.</p>
  
  <p>If i use </p>
  
  <pre><code>  $(document).ready(function() {
  </code></pre>
  
  <p>It doesn't check the images height. The weird is when I inspect element, suddenly it loads <code>.ready</code> function and gives me the height of the image. As if, the <code>.ready</code> function, in my case, only works when there is activity in the web, such as when I inspect the element. </p>
  
  <p>How to solve this. </p>
  
  <p>Can anybody help, please? Thanks in advance.        </p>