I have a frame with an image tag inside, like a photo gallery
<div id="frame">
<img src="yahoo.com/logo.gif" id="photo" />
</div>
With jQuery I'm going to dynamically change the img src to a different image URL. This causes the frame to jump in height as the image dimensions are different. It also cause a flash as the browser loads the image. It's a bad experience.
What'd I'd like to know if is possible, is whenever the img src is changed, is for jQuery to show a default loader, and then once the image is fully loaded, then show the image and remove the loader.
Any suggestions? hopefully a plugin? thanks