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