title: JQuery load event on images
body: <p>I want to resize an image parent to the same size of the image, when the images are loaded.</p>
  
  <p>At this time i'm using this code:</p>
  
  <pre><code>$(window).load(function(){
      $('.image-principale').each(function(){
          $(this).parent().css('height', $(this).height());
      });
  });
  </code></pre>
  
  <p>It work, except than it runs only when <em>every</em> image has loaded.
  I tried to add an load handler to every image directly but they doesn't trigger.</p>
  
  <p>What's wrong?</p>
  
  <p>Thank you!</p>