title: new Image(), how to know if image 100% loaded or not?
body: <p>I'm creating new image using</p>
  
  <pre><code>img = new Image();
  img.src = image_url;
  </code></pre>
  
  <p>Then I'm assigning img.src to the img tag's src in DOM</p>
  
  <pre><code>$("#my_img").attr("src", img.src);
  </code></pre>
  
  <p>How can I know that img.src has 100% loaded? What is the best practice?
  <code>img.complete</code> seem to me little buggy in some browsers.</p>
  
  <p>So, in another words, I need to assign <code>img.src</code> to <code>$("#my_img")</code> only after <code>img</code> it was 100% loaded.</p>
  
  <p>Thank you!</p>