📌  相关文章
📜  javascript 循环执行函数 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:15.352000             🧑  作者: Mango

代码示例1
var i, factor, 
    duration = 250,
    delayTime = 500;

for (i = 2, factor = 0; i <= 4; i++, factor++) {
    galleryAnimation(i, factor);
}

function galleryAnimation(i, factor) {
    $("#pic" + i).delay(factor * delayTime).fadeIn(duration);
}