我有这个 jQuery:
$(function() {
// create the image rotator
var lightShow = setInterval(rotateImages, 500);
function rotateImages() {
var oCurPhoto = $('#photoShow div.current');
var oNxtPhoto = oCurPhoto.next();
if (oNxtPhoto.length == 0){
oNxtPhoto = $('#photoShow div:first');
}
oCurPhoto.removeClass('current').addClass('previous');
oNxtPhoto.hide().addClass('current').fadeIn(2000, function() {
oCurPhoto.removeClass('previous');
});
}
});
它包含在一个循环中,因此该行将连续执行 5 次
但我想要做的是停止使用循环启动fadeIn
另一个的效果。fadeIn