JQUERY1.9学习笔记 之可见性过滤器(二) 可见选择器
描述:选择所有可见的元素。
例:点击时让所有的可见的div元素变黄。
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>visible demo</title>
<style>
div{
width:50px;
height:40px;
margin:5px;
border:3px outset green;
float:left;
}
.starthidden{
display:none;
}
</style>
<script src="./js/jquery-1.9.1.min.js"></script>
</head>
<body>
<button>Show hidden to se they don't change</button>
<div></div>
<div class="starthidden"></div>
<div></div>
<div></div>
<div style="display:none;"></div>
<script>
$("div:visible").click(function(){
$(this).css("background","yellow");
});
$("button").click(function(){
$("div:hidden").show("fast");
});
</script>
</body>
</html>
最新文章
- kvm虚拟机静态和动态迁移
- c#实现邮件发送链接激活
- Google Chrome 调试
- CUBRID学习笔记 22 插入数据
- mac 系统开发android,真机调试解决方案
- PB打开ole控件IE浏览器版本问题_指定Webbrowser控件所用IE内核版本(转)
- 【.Net Remoting-1】
- pythonBasic
- php数据库连接及简单操作
- Space Golf~物理题目
- SLAM+语音机器人DIY系列:(二)ROS入门——4.如何编写ROS的第一个程序hello_world
- bzoj2553 禁忌
- [dpdk][kernel][driver] 如何让DPDK的UIO开机自动加载到正确的网卡上
- git分支流
- opesntack 底层共享存储 迁移配置
- 使用async-http-client实现异步批量http请求
- python学习笔记(二十九)为什么python的多线程不能利用多核CPU
- AttributeError: &#39;module&#39; object has no attribute get&#39;
- 【hdu1005】Number Sequence
- 刷题常用的STL容器总结