一个很好玩的jquery例子:小方块先逐渐显示,后向右滑动,再向左滑回,最后向上隐藏
来源:互联网 发布:在线模拟装机软件 编辑:程序博客网 时间:2024/06/06 01:33
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title> The jquery Test </title>
<meta name="Keywords" content="">
<meta name="Description" content="">
<script type="text/javascript" language="javascript" src="http://longzhiwen-478.blog.163.com/blog/jquery-1.4.2.js"></script>
<!--<script type="text/javascript" language="javascript" src="http://longzhiwen-478.blog.163.com/blog/json.js"></script>-->
</head>
<body>
<style>
div { margin:3px; width:40px; height:40px;
position:absolute; left:0px; top:30px;
background:green; display:none; }
div.newcolor { background:blue; }
div.newcolor2 { background:red; }
</style>
Click here...
<div></div>
<script type="text/javascript">
$(document.body).click(function () {
$("div").show("slow");
$("div").animate({left:'+=1000'},1000);
$("div").queue(function () {
$(this).addClass("newcolor2");
$(this).dequeue();
});
$("div").animate({left:'-=1000'},1000);
$("div").queue(function () {
$(this).removeClass("newcolor2");
$(this).addClass("newcolor");
$(this).dequeue();
$(this).removeClass("newcolor");
});
$("div").slideUp(); //向上隐藏
});
</script>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title> The jquery Test </title>
<meta name="Keywords" content="">
<meta name="Description" content="">
<script type="text/javascript" language="javascript" src="http://longzhiwen-478.blog.163.com/blog/jquery-1.4.2.js"></script>
<!--<script type="text/javascript" language="javascript" src="http://longzhiwen-478.blog.163.com/blog/json.js"></script>-->
</head>
<body>
<style>
div { margin:3px; width:40px; height:40px;
position:absolute; left:0px; top:30px;
background:green; display:none; }
div.newcolor { background:blue; }
div.newcolor2 { background:red; }
</style>
Click here...
<div></div>
<script type="text/javascript">
$(document.body).click(function () {
$("div").show("slow");
$("div").animate({left:'+=1000'},1000);
$("div").queue(function () {
$(this).addClass("newcolor2");
$(this).dequeue();
});
$("div").animate({left:'-=1000'},1000);
$("div").queue(function () {
$(this).removeClass("newcolor2");
$(this).addClass("newcolor");
$(this).dequeue();
$(this).removeClass("newcolor");
});
$("div").slideUp(); //向上隐藏
});
</script>
</body>
</html>
0 0
- 一个很好玩的jquery例子:小方块先逐渐显示,后向右滑动,再向左滑回,最后向上隐藏
- 检测滑动触摸(向左,向右,向上,向下)-我的cocos2d-x学习之路
- 【11】jQuery控制的不同方向的滑动(向左、向右滑动等)
- 向左或向右滑动在任何地方一个UITableViewCell删除的单元格没有删除按钮?
- html jquery显示和隐藏的小例子
- appium+ios 指定页面向左向右向上向下滑动多少:mobile:dragFromToForDuration
- 滑动的手势 UIPanGestureRecognizer 识别向左还是向右
- Unity3d 滑动事件--向上、向下、向左、向右(PC好用但是手机滑动不是很理想)
- android一个向上滑动显示菜单,向下滑动隐藏菜单实现
- 滑动逐渐隐藏导航栏的实现
- jquery实现图片的向左和向右切换一组图片
- Android 向左向右滑动销毁(finish)Activity, 随着手势的滑动而滑动的效果
- 图片滚动向左到最后又向右
- Unity3D 判断鼠标向左还是向右滑动
- 看到一个很好玩的代码显示~~~~来瞄瞄
- 一个jquery的小例子
- ViewPager向右滑动到最后,再向右滑动实现界面跳转
- js图片不间断滚动代码(向上,向下,向左,向右)
- django报错:No module named urls
- 【转】Python2.6下安装Mysqldb出现DeprecationWarning: the sets module is deprecated from sets错误解决方案
- python链接mysql常见问题汇总
- HTML格式的邮件需注意的地方
- JS nodeName、nodeValue、nodeType返回类型
- 一个很好玩的jquery例子:小方块先逐渐显示,后向右滑动,再向左滑回,最后向上隐藏
- mongodb注册为服务
- django1.2.4 session保存有bug
- python数组交集、并集与不同
- python数组交集、并集与不同
- python Word 编程
- eclipse新建python项Project interpreter not specified
- python 调用word打开doc文档报错,“word无法启动转换器mswrd632.wpc”
- 使用Python和xml.etree.ElementTree解析xml文件