JQ 队列
<div class="divtt">
<div class="divtest"></div>
</div>
<div class="divtt">
<div class="divtest"></div>
</div>
<div class="divtt">
<div class="divtest"></div>
</div>
<div class="divtt">
<div class="divtest"></div>
</div>
.divtt
{
position: relative;
width: 150px;
height: 150px;
border: 1px solid black;
float: left;
margin-left: 10px;
margin-top: 10px;
overflow: hidden;
}
.divtest
{
position: absolute;
width: 150px;
height: 150px;
opacity: 0.3;
top: 0px;
left: -150px;
background-color: black;
}
<div class="divtt">
<div class="divtest"></div>
</div>
<div class="divtt">
<div class="divtest"></div>
</div>
<div class="divtt">
<div class="divtest"></div>
</div>
<div class="divtt">
<div class="divtest"></div>
</div>
<div class="divtt">
<div class="divtest"></div>
</div>
<div class="divtt">
<div class="divtest"></div>
</div>
var div1 = $(".divtt").find(".divtest")
var FUNC = [
function () { div1.eq(0).animate({ left: "150px" }, 200, aniCB); },
function () { div1.eq(1).animate({ left: "150px" }, 200, aniCB); },
function () { div1.eq(2).animate({ left: "150px" }, 200, aniCB); },
function () { div1.eq(3).animate({ left: "150px" }, 200, aniCB); },
function () { div1.eq(4).animate({ left: "150px" }, 200, aniCB); },
function () { div1.eq(5).animate({ left: "150px" }, 200, aniCB); },
function () { div1.eq(6).animate({ left: "150px" }, 200, aniCB); },
function () { div1.eq(7).animate({ left: "150px" }, 200, aniCB); },
function () { div1.eq(8).animate({ left: "150px" }, 200, aniCB); },
function () { div1.eq(9).animate({ left: "150px" }, 200, aniCB); },
function () { div1.eq(9).animate({ left: "-150px" }, 200, aniCB); },
function () { div1.eq(8).animate({ left: "-150px" }, 200, aniCB); },
function () { div1.eq(7).animate({ left: "-150px" }, 200, aniCB); },
function () { div1.eq(6).animate({ left: "-150px" }, 200, aniCB); },
function () { div1.eq(5).animate({ left: "-150px" }, 200, aniCB); },
function () { div1.eq(4).animate({ left: "-150px" }, 200, aniCB); },
function () { div1.eq(3).animate({ left: "-150px" }, 200, aniCB); },
function () { div1.eq(2).animate({ left: "-150px" }, 200, aniCB); },
function () { div1.eq(1).animate({ left: "-150px" }, 200, aniCB); },
function () { div1.eq(0).animate({ left: "-150px" }, 200, aniCB); },
];
var aniCB = function () {
$(document).dequeue("myAnimation");
}
$(document).queue("myAnimation", FUNC);
aniCB()
最新文章
- 2016年中国微信小程序专题研究报告
- 将src非空的属性注入到des中
- Cisco IOS Software Activation Command Reference
- 修改app名字
- 在CentOS下安装配置MySQL(转)
- Android Studio 首坑 Gradle sync failed: Cause: error in opening zip file 的错误
- 利用create-react-app结合react-redux、react-router4构建单页应用
- Cocos2D中屏幕分辨率解释
- Html5列表元素
- 十一、移植优化---CONFIG 优化进 menuconfig(2)
- utf-8的中文,一个字符占几个字节
- 并行管理工具——pdsh
- MySQL 基础 事务
- Oracle 11g 物理Dataguard日常操作维护(二)
- 剑指offer-矩形覆盖-斐波那契数列(递归,递推)
- 8 python time$datetime
- Java加密代码 转换成Net版
- python模块之xlrd,xlwt,读写execl(xls,xlsx)
- 在VMware中使用Nat方式设置静态IP
- Error:java: Compilation failed: internal java compiler error(转)
热门文章
- strust.xml
- MySql数据库安装&;修改密码&;开启远程连接图解
- hdu4968
- POJ 3274 HASH
- Swift3.0语言教程获取字符串编码与哈希地址
- WPF中ControlTemplate和DataTemplate的区别
- C#遍历enum类型
- 来自于2016.2.23的flag
- The design of a distributed variant of Plato framework to support collaborated editing
- Leetcode Remove Nth Node From End of List