我想使用 fadeToggle 自动淡入和淡出一些图像。它正在工作,但是所有图像都开始“淡入”,我希望它们开始不可见,以便它们一张一张地出现。提前致谢!
$(function () {
function run_animation($element, delay, duration) {
$element.delay(delay).fadeToggle(duration, function () {
run_animation($element, delay, duration);
});
}
run_animation($('.pointer1'), 2000, 1000);
run_animation($('.pointer2'), 2500, 1000);
run_animation($('.pointer3'), 3000, 1000);
run_animation($('.pointer4'), 3500, 1000);
run_animation($('.pointer5'), 4000, 1000);