8
I'm trying to get this to crossfade, but I'm not entirely sure how.
How can I make this jQuery method crossfade the images?
$('a.thumb').click(function () {
var src = $(this).attr('href');
if (src != $('div#imageDisplay > img').attr('src')) {
$('div#imageDisplay > img').stop().animate({ opacity: '0', duration: 500 }, function () {
$(this).attr('src', src);
}).load(function () {
$(this).stop().animate({ opacity: '1', duration: 500 });
});
}
return false;
});