如何让每个功能继续保持永久性。
$('.featuedbanner img').each(function(){
$(this).delay(featlay).animate({opacity: 1, leaveTransforms:true}, {duration:2000, queue:true});
featlay += 6000;
$(this).delay(featlay).animate({opacity: 0, leaveTransforms:true}, {duration:2000, queue:true});
});
这是为了使这成为一个无限循环
答案 0 :(得分:3)
答案 1 :(得分:1)
var loop = function(){
var featlay = 0;
$('.featuedbanner img').each(function(){
$(this).delay(featlay).animate({opacity: 1, leaveTransforms:true}, {duration:2000, queue:true});
featlay += 6000;
$(this).delay(featlay).animate({opacity: 0, leaveTransforms:true}, {duration:2000, queue:true});
});
setTimeout(loop, 0);
};
loop();