Execute jQuery code when images have loaded from external resource
<p>I'm getting users profile pictures from Facebook so their loading time varies quite a lot. When they have loaded I want to resize them. I have the resizing code working OK, but cannot get the actual code to execute reliably at the right time. According to the info I've found this should work:</p>

<pre><code>$('.userPic').load(function () {

... code to resize pictures

});
</code></pre>

<p>But it doesn't seem 100% reliable. Any other hints or tips?</p>

<p>Thanks
Nick Swan</p>
