<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>jquery queue</title>
<script src="framework/jquery-1.10.2.min.js"></script>
<script>
var content = "javascript is a good language!!";
$(function(){
function callback(){
console.log(this);
} function notify(word){
console.log("notify:" + word);
$("#content").append(word);
} var arr = content.split(' '); $.each(arr,function(index,item){
for(var i=0; i<item.length; i++) {
// console.log(i + " !!i = " + (!!i) + (!i));
(function(word){
$("#content").queue("dynamicStyle", function(next){
callback.call($(this));
notify(word);
next();
}).delay(200,"dynamicStyle");
})(item[i]);
}
$("#content").queue("dynamicStyle", function(next){
callback.call($(this));
notify("&nbsp;");
next();
}).delay(200,"dynamicStyle"); }); $("#content").dequeue("dynamicStyle");
});
</script>
</head>
<body>
<div id="content"></div>
</body>
</html>

最新文章

  1. 【Win10开发】Toast通知
  2. spring事务学习(转账案例)(一)
  3. Python Opearte MS-SQL Use Pymssql
  4. strlen() 和 strcpy()函数
  5. HDU 1405 The Last Practice
  6. javascript获取元素的计算样式
  7. 经验:Ubuntu 登陆 L2TP VPN
  8. Tomcat剖析(三):连接器(1)
  9. Modbus软件开发实战指南 之 开发自己的Modbus Poll工具 - 1
  10. 安卓笔记-- popupwindow back键不消失的问题
  11. IIS版本号可以被识别 解决方案
  12. 51Node 1051---最大子矩阵和
  13. Python GIL(Global Interpreter Lock)
  14. Python生成文件列表
  15. quantum theory
  16. Python20-Day05
  17. Git-远程仓库【转】
  18. tomcat下manager配置
  19. docker的私有仓库的搭建
  20. phpcms 添加稿件到栏目 add_content

热门文章

  1. python多线程(二)
  2. Laravel 出现&quot;RuntimeException inEncrypter.php line 43: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.&quot;问题的解决办法
  3. ActiveMQ 核心概念
  4. 数据性能调校——查看最耗资源的各种SQL
  5. python 报错——Python TypeError: &#39;module&#39; object is not callable 原因分析
  6. NodeJS应用程序设置为window service-辅助工具(C#)
  7. des加密——补齐
  8. Oracle数据库的启动与关闭
  9. 基于linux的ekho(余音)安装与开发
  10. 【转载】OpenWrt sysupgrade 命令行更新固件到最新版