jQuery的toggle()方法
2014-08-05 00:00
204 查看
摘要: toggle()方法
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Jquery动态的显示和隐藏</title>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script>
$(function(){
$("input").click(function(){
$("#hello").toggle("blind");
});
});
</script>
</head>
<body>
<input type="button" value="点击"/>
<div id="hello" style="width:80%; background:#FF00FF">
<p>今天是个好天气</p>
<p>我们一起出去玩吧</p>
<p>我们一起去河边钓鱼怎么样</p>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Jquery动态的显示和隐藏</title>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script>
$(function(){
$("input").click(function(){
$("#hello").toggle("blind");
});
});
</script>
</head>
<body>
<input type="button" value="点击"/>
<div id="hello" style="width:80%; background:#FF00FF">
<p>今天是个好天气</p>
<p>我们一起出去玩吧</p>
<p>我们一起去河边钓鱼怎么样</p>
</div>
</body>
</html>
相关文章推荐
- jquery之修改元素样式(添加和删除类名称,使用addClass(),removeClass(),toggleClass()方法)
- jQuery中的toggle方法
- jquery中交替点击事件toggle方法的使用示例
- Jquery的toggle()与trigger()方法
- jquery的toggle()方法
- jQuery方法Toggle()应用
- jquery中 toggleClass方法的一种用法
- jquery中交替点击事件toggle方法的使用示例
- 一个按钮控制div的显示与隐藏。运用jquery的toggle双、多事件绑定方法
- jQuery方法toggleClass的方法
- Jquery FadeIn,FadeOut,toggle,slideToggle的使用方法实例
- JQuery入门――事件切换之toggle()方法应用介绍
- JQuery入门——事件切换之toggle()方法
- jquery中交替点击事件toggle方法的使用示例
- jquery 显示隐藏div方法show(),hide(),toggle(),slideDown()总结
- 很实用的jQuery事件 - toggle() 方法
- jQuery 效果 - toggle() 方法
- jQuery方法简洁实现隔行换色及toggleClass的使用
- 页面元素绑定jquery toggle后元素隐藏的解决方法
- 遇到jQuery中toggle()与checkbox的冲突,使用其他方法实现同样的效果(工作笔记)