淡入每一个元素 - 一个接一个 [英] Fade in each element - one after another

查看:188
本文介绍了淡入每一个元素 - 一个接一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找到一种方式来加载一个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?

下面是我的code为例,我现在用的是jQuery框架。

Here is an example of my code, I am using the jquery framework.

code: http://pastie.org/343896

推荐答案

那么,你可以设置你的淡入淡出功能触发下一步之一。

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆