如下所示,在动画效果中的回调函数中进行src的修改和动画的切换
$(".TopImg").animate( {opacity:'toggle'}, "slow", null, function(){ $(".TopImg").attr("src","../images/2.jpg"); $(".TopImg").animate({opacity:'toggle'},"slow"); } );
如下所示,在动画效果中的回调函数中进行src的修改和动画的切换
$(".TopImg").animate( {opacity:'toggle'}, "slow", null, function(){ $(".TopImg").attr("src","../images/2.jpg"); $(".TopImg").animate({opacity:'toggle'},"slow"); } );