jQuery:通过孩子的动画,连续循环 [英] jQuery: animated, continuous loop through children

查看:60
本文介绍了jQuery:通过孩子的动画,连续循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关闭但不完全在那里。我想让第一个子div显示几秒钟,向下滑动(通过定位)并淡出视图,然后下一个孩子向上滑动并淡入视图。连续重复,在显示最后一个孩子后循环回来。

Close but not quite there. I'd like to have the first child div displayed for a couple seconds, slide down (via positioning) and fade out of view, then the next child slide up and fade into view. Repeat continuously, looping back after the last child is displayed.

看起来我已经让循环工作了虽然计数似乎把孩子的div放在彼此之上。我做错了什么?

Looks like I've got the loop working though the count seems to pile the child divs on top of each other. What am I doing wrong?

http://jsfiddle.net/rrbaker/Xmk2y/4/

推荐答案

这是我的混音: http://jsfiddle.net/ddrace/DJuV7/1/

我重新安排了一些事情以使其更容易理解添加了暂停和动画的设置,以使其干燥并更容易调整。

I rearranged some things to make it more understandable and added settings for the pause and animation to keep it DRY and easier to tweak.

这篇关于jQuery:通过孩子的动画,连续循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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