title: Jquery function to check if SRCset of image finish load
body: <p>I need to modify a a function that change a image via SRCset.
  Right now i can check if the srcset attribute has changed. That's ok.
  But on slow connections, the srcset attribute changes and after a few seconds the image it self change on browser view.</p>
  
  <p>Is there a way to check if the image display really finish loading and not only the img attribute?</p>
  
  <p>I tried MutationObserver, .load(), .onLoad() etc</p>
  
  <p>Sorry if that is not clear or the question is just dumb</p>
  
  <p>Thanks</p>
  
  <p>Edit:</p>
  
  <p>The soluction at the end was something like this:</p>
  
  <pre><code>var previewIMG = jQuery(this).find('.product-grid-image img');
  var swatchImgSRC = jQuery(this).attr("data-product-sku");
  
  
  previewIMG.one("load", function(){
    LoadingDiv.removeClass('active-loading');
  }).attr("srcset", swatchImgSRC);
  </code></pre>