title: jQuery image load callback
body: <p>Dynamically adding an image to the page after load then user interaction and am having trouble firing a function after that image has completely loaded. I figured that using jQuery's <code>.load()</code> method would be fine.. but according my console and a bunch of documenting <code>.log</code> business it's never executed. See below.. thank you!</p>
  
  <pre><code>$('body')
      .append('&lt;img id="ad" src="img/ad.jpg" alt="Advertising Network" /&gt;')
      .load(function(){
          console.log('ad load complete');
          $('#submit').click();
      });
  </code></pre>
  
  <hr>
  
  <p>UPDATE:</p>
  
  <p>To clarify, this is after both <code>document</code> and <code>window</code> load.</p>