淡入每个元素 - 一个接一个 [英] Fade in each element - one after another
问题描述
我正在尝试找到一种方法来加载 JSON 页面以显示我目前拥有的内容.但我试图一个接一个地淡入每个元素?有没有人熟悉这样做的方法?
I am trying to find a way to load a JSON page to display my content, which I currently have. But I am trying to fade in each element one after another? Is anyone familiar with a way to do that?
淡入每个元素略有延迟?
Fade in each element with a slight delay?
这是我的代码示例,我使用的是 jquery 框架.
Here is an example of my code, I am using the jquery framework.
推荐答案
好吧,您可以设置淡入淡出功能来触发下一个".
Well, you could setup your fade functions to trigger the "next" one.
$("div#foo").fadeIn("fast",function(){
$("div#bar").fadeIn("fast", function(){
// etc.
});
});
但是计时器可能是一个更好的系统,或者是一个函数,它可以将它们全部取出,将它们放入一个数组中,然后一次一个地弹出它们,中间有一个延迟,一次一个地使它们消失.
But a timer may be a better system, or a function that gets them all, puts them in an array, then pops them off one at a time with a delay in between, fading them in one at a time.
这篇关于淡入每个元素 - 一个接一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!