title: jQuery or Javascript check if image loaded
body: <p>I know there is a lot of these on Stackoverflow but I haven't found one that works for me in a recent version of jquery (1.10.2).</p>
  
  <p>I did try:</p>
  
  <p><code>$(".lazy").load(function (){}</code></p>
  
  <p>But I believe after some research using <code>.load</code> to detect image load is deprecated in jQuery 1.8. What I need to do is fire an image resize function once the images are loaded. I don't have control over the 
  HTML and at the moment I am having to add the image dimensions via jQuery by attaching an attribute (via <code>.attr()</code>) once page loads so that I can use lazyload js.</p>
  
  <p>The problem is that I need an accurate way to hold off all my various scripts until the image has loaded properly else the functions sometimes fire before every image had loaded. I have tried using <code>$(window).load(function (){});</code> however it sometimes still fires before every image had loaded. </p>