问题描述
我希望先出现.title
然后再出现.element
然后再出现.list
。
但是,我似乎无法弄清楚该怎么做。
它们总是同时出现。
setTimeout(function() {
$("#screen" + screenNum).show();
$("#screen" + screenNum + " .title").each(function(index) {
$(this).css("display", "block");
TweenLite.from($(this), animationSpeed, {
x: -1000,
ease: Cubic.easeOut,
delay: index * 0.1
});
});
$("#screen" + screenNum + " .element").each(function(index) {
$(this).css("display", "block");
TweenLite.from($(this), animationSpeed, {
y: 1080,
ease: Cubic.easeOut,
delay: index * 0.1
});
});
$("#screen" + screenNum + " .list").each(function(index) {
$(this).css("display", "block");
TweenLite.from($(this), animationSpeed, {
y: -500,
ease: Cubic.easeOut,
delay: index * 0.1
});
});
}, numEle * 100);
1楼
Andrew Magnay
0
2019-02-25 10:08:29
我可能会在jquery
使用.load
函数,它的作用是第二次完成加载将运行一个函数。
您可以使用它来表示仅在加载文档时运行一个函数,在页面上的对象加载时甚至在另一个javascript函数时运行。
使用它只是引用对象
$("object here").load(function);
要么
$("object").load(function(){
});
如果您想了解更多信息, w3schools页面: :