+3  A: 

You can set up a handler on the "load" event.

$('img.whatever')
  .load(function() { /* do stuff */ })
  .attr('src', newURL);

Actually I guess you'd want to do this with "live()":

$('img.reloadable').live('load', function() { $(this).show(); });
// ...
$('img#someId').hide().attr('src', newURL);
Pointy
thanks, this is it. To be real clear for anyone else: When `src="xxx"` is changed with js, `$.load()` fires AFTER the new image is finished loading.
carillonator
A: 

You just just preload the images with jQuery so that way when the user clicks, the next image is already loaded and there shouldn't be a delay...that is unless the user goes to your page, and starts clicking on the image before they are loaded.

http://engineeredweb.com/blog/09/12/preloading-images-jquery-and-javascript

Catfish
yeah I considered this but there's going to about 100 full-size images waiting to be loaded, and most people won't be looking at all of them.
carillonator
A: 
var slideimg = $('#slideimage');
slideimg.click(function(){
    var img = new Image();
    var url = 'url_to_next_image.jpg';
    $(img).bind('load',function(){
        $('#loading').hide();
        slideimg.attr('src',url);
    }).attr('src',url);
    $('#loading').show();
});

This should work even with IE's crazy cache handling.

PetersenDidIt
The only trouble with this is that it'll bind a new load handler on each click.
Pointy