我要做的只是淡出容器内的所有图像,将#next1的图像替换为#active,然后再次淡入所有图像。
这是我的代码:
$('.logo').fadeOut('slow', function() {
$('#active>img').replaceWith( $('#next1>img') );
}).fadeIn('slow', function() {});
这不起作用。我发现自己看着空的#active
但是这个;
$('.logo').fadeOut('slow', function() {}).fadeIn('slow', function() {});
$('#active>img').replaceWith( $('#next1>img') );
使替换很好,但不是我想要做的动画。
我使用 chrome 和 ie 得到相同的结果。