jQuery Load default image if other fails
<p>I have been asking around but I dont seem to be getting any answers.</p>

<p>I want to load a default image which will be "/images2/no-avatar.png" if another image fails. The img id will be "avatar".</p>

<p>I have the latest version of jQuery so that wont be an issue.</p>

<p>The image will look something like this:</p>

<pre><code>&lt;img src="http://www.website.com/the-image.jpg" height="100" width="100" id="avatar" /&gt;
</code></pre>

<p>and if it fails look like this</p>

<pre><code>&lt;img src="/images2/no-avatar.png" height="100" width="100" id="avatar" /&gt;
</code></pre>

<p>I have been trying to find this for a while with no answers, so if you help thanks in advanced.</p>
