描述:选择所有可见的元素。

例:点击时让所有的可见的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>

最新文章

  1. kvm虚拟机静态和动态迁移
  2. c#实现邮件发送链接激活
  3. Google Chrome 调试
  4. CUBRID学习笔记 22 插入数据
  5. mac 系统开发android,真机调试解决方案
  6. PB打开ole控件IE浏览器版本问题_指定Webbrowser控件所用IE内核版本(转)
  7. 【.Net Remoting-1】
  8. pythonBasic
  9. php数据库连接及简单操作
  10. Space Golf~物理题目
  11. SLAM+语音机器人DIY系列:(二)ROS入门——4.如何编写ROS的第一个程序hello_world
  12. bzoj2553 禁忌
  13. [dpdk][kernel][driver] 如何让DPDK的UIO开机自动加载到正确的网卡上
  14. git分支流
  15. opesntack 底层共享存储 迁移配置
  16. 使用async-http-client实现异步批量http请求
  17. python学习笔记(二十九)为什么python的多线程不能利用多核CPU
  18. AttributeError: &#39;module&#39; object has no attribute get&#39;
  19. 【hdu1005】Number Sequence
  20. 刷题常用的STL容器总结

热门文章

  1. asp 数组
  2. 0ull 是什么意思?
  3. [MCM]2014年美赛MCM题目原文及翻译
  4. 《University Calculus》-chape6-定积分的应用-平面曲线长度
  5. django运行django-admin.py无法创建网站
  6. Counting - SGU 117(快速幂)
  7. UVaLive4043 UVa1411 Ants 巨人与鬼
  8. input标签上传图片怎么获取src;
  9. spring security +spring boot 自定义 403 页面
  10. DELPHI TreeView 文件目录树和 设置节点图标 完整