title: Check onload & onerror using JS/jQuery?
body: <p>Using HTML I could manually put this into the body</p>
  
  <pre><code>&lt;img style="display:none;"
  onload="Success('test')"
  onerror="Fail('test')"
  src="http://example.com/test.png"
  /&gt;
  </code></pre>
  
  <p>Is there anyway to do this check using jQuery or Javascript?</p>
  
  <p>edit: I want to avoid using HTML and inserting image manually. I am trying to accomplish the check using just jQuery/JS.</p>
  
  <p>Thanks!</p>