title: Execute a function after all images within a div loaded
body: <p>I want to get height of a div with jQuery and in this div, there is some images that change the size of this div when loaded:</p>
  
  <p>but with code below, it gives me height of div before images were loaded</p>
  
  <pre><code>$(document).ready(function() {
          $(".link_module").each(
              function () {
                  maxheight = Math.max(maxheight,$(this).height());
              }
          ).height(maxheight);
  });
  </code></pre>
  
  <p>I've changed my code to this but nothing change:</p>
  
  <pre><code>$(document).ready(function() {
      $(".link_module img").load(
          function (){
              $(".link_module").each(
                  function () {
                      maxheight = Math.max(maxheight,$(this).height());
                  }
              ).height(maxheight);
          }
      )
  });
  </code></pre>
  
  <p>Can anyone help me change the code to reach my goal?</p>