Execute jQuery code when images have loaded from external resource
- by Nick Swan
Hi all,
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:
$('.userPic').load(function () {
... code to resize pictures
});
But it doesn't seem 100% reliable. Any other hints or tips?
Thanks
Nick Swan