JQuery - Check when image is loaded?
<p>I am having a bit of trouble working out when an image has been loaded.</p>

<p>I have been told that the following function will work but it isn't doing anything.</p>

<pre><code>$("#photos img:first").load(function (){
    alert("Image loaded!");
});
</code></pre>

<p>There are no error's in my code. Everything else in my script works great.</p>

<p>My HTML looks like this.</p>

<pre><code>&lt;div id="photos"&gt;
    &lt;img src="../sample1.jpg" style="background-color:#000033" width="1" height="1" alt="Frog!"/&gt;
    &lt;img src="../sample2.jpg" style="background-color:#999999" width="1" height="1" alt="Zooey!"/&gt;
&lt;/div&gt;
</code></pre>

<p>Do I have the wrong JQuery function? It should also be noted that the visibility is set to hidden. However even when visible there is no alert.</p>

<p>Any ideas?</p>
