<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>使用可见性过滤选择器</title>
<link href="../../CSS/2-9.css" rel="stylesheet" />
<script src="../../JQuery/jquery-2.1.4.min.js"></script>
<script type="text/javascript">
//增加可见元素类别
$(function () {
$("span:hidden").show()
$("div:visible").addClass("GetFocus");
})
效果图:
$(function () {
$("span:hidden").show().addClass("GetFocus");
//下面这种写法并没有什么卵用
//$("span:hidden").show();
//$("span:hidden").addClass("GetFocus");
})
效果图

</script>
</head>
<body>
<span style="display: none">Hidden</span>
<div>Visible</div>
</body>
</html>

JQuery 可见性过滤选择器的更多相关文章

  1. JQuery可见性过滤选择器:hidden无法获取通过visibility:hidden样式隐藏的元素-遁地龙卷风

    1.版本问题 如果你可以获取下列元素 <input type="hidden"/> <div style="display:none"> ...

  2. jQuery选择器之可见性过滤选择器Demo

    测试代码 05-可见性过滤选择器.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" &q ...

  3. jQuery学习笔记之可见性过滤选择器

    可见性过滤选择器是根据元素的可见和不可见状态来选择相应的元素. 显示隐藏的例子: <!DOCTYPE html> <html> <head> <script ...

  4. jQuery中的内容、可见性过滤选择器(四、四)::contains()、:empty、:has()、:parent、:hidden、:visible

    <!DOCTYPE html> <html> <head> <title>内容.可见性过滤选择器</title> <meta http ...

  5. jQuery简单过滤选择器

    <html xmlns="http://www.w3.org/1999/xhtml"> <head>     <!--jQuery选择器详解 根据所获 ...

  6. Jquery的过滤选择器分为哪几种?

    Jquery的过滤选择器分为哪几种? 转载▼ 标签: jquery 过滤选择器 分类 分类: JQuery 所有的过滤选择器分为哪几种: 一.基本过滤选择器(重点掌握下列八个) :first 选取第一 ...

  7. 第一百六十五节,jQuery,过滤选择器

    jQuery,过滤选择器 学习要点: 1.基本过滤器 2.内容过滤器 3.可见性过滤器 4.子元素过滤器 5.其他方法 过滤选择器简称:过滤器.它其实也是一种选择器,而这种选择器类似与 CSS3 (h ...

  8. jQuery 简单过滤选择器

    <!DOCTYPE HTML> <html> <head> <title> 使用jQuery基本过滤选择器 </title> <scr ...

  9. jQuery基本过滤选择器

    jQuery基本过滤选择器: <h1>this is h1</h1> <div id="p1"> <h2>this is h2< ...

随机推荐

  1. POJ 2891 Strange Way to Express Integers(中国剩余定理)

    题目链接 虽然我不懂... #include <cstdio> #include <cstring> #include <map> #include <cma ...

  2. Shortcut 常用快捷键

    多行注释: VS2010:   / NotePad++: Ctrl Q Xcode:    CMMND / 回到光标所在之前位置 VS2010: Ctrl +/- 关闭当前页: VS2010: 鼠标中 ...

  3. log4net配置文件设置

    windows服务执行cmd命令 最长公共子字符串 log4net配置文件设置 2011-11-16 13:15:41|  分类: Notes |  标签: |字号大中小 订阅     log4net ...

  4. 使用Hydra扫描网络中存在SSH弱登录密码的Linux系统

    1. apt-get install cmake libssl-dev 2. apt-get install hydra (需要图形界面的话用hydra-gtk) 3. hydra -s 22 -v ...

  5. nova.conf部分参数解析

    #----------networking options---------------# #nova的dhcpbridge配置的文件位置 --dhcpbridge_flagfile=/etc/nov ...

  6. Apache Spark源码走读之14 -- Graphx实现剖析

    欢迎转载,转载请注明出处,徽沪一郎. 概要 图的并行化处理一直是一个非常热门的话题,这里头的重点有两个,一是如何将图的算法并行化,二是找到一个合适的并行化处理框架.Spark作为一个非常优秀的并行处理 ...

  7. 19. 求平方根序列前N项和

    求平方根序列前N项和 #include <stdio.h> #include <math.h> int main() { int i, n; double item, sum; ...

  8. Bootstrap页面布局7 - Bootstrap响应式布局的实用类

    在bootstrap-responsive.css这个CSS样式表中已经为我们设定好了几个实用的类: .visible-phone: 在智能手机设备上显示这个元素,在其他设备上隐藏该元素 .visib ...

  9. linux下利用curl监控网页shell脚本

    #!/bin/bash smail() {mail -s "$1" gjw_apparitor@gmail.com <<EOF$1$2====report time: ...

  10. link them together by means of pointers

    Computer Science An Overview _J. Glenn Brookshear _11th Edition An alternative to storing a heteroge ...