<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
<script>
$(function () {
//$('li').css('background','red');
//$('li:first').css('background','red');
//$('li:last').css('background','red');
//$('li:eq(2)').css('background','red');
//$('li').filter('.box').css('background','blue');
//$('li').filter('[title=第二]').css('background','gray');
//$('li:even').css('background','gray'); //序号为偶数的元素
//$('li:odd').css('background','gray'); //序号为奇数的元素
//$('li:lt(3)').css('background','gray'); //序号小于n的元素
$('li:gt(3)').css('background','gray'); //序号大于n的元素
})
</script>
</head>
<body>
<ul>
<li class="box">11</li>
<li title="第二">11</li>
<li>11</li>
<li>11</li>
<li>11</li>
<li>11</li>
<li>11</li>
</ul> </body>
</html>

jquery过滤器的更多相关文章

  1. Jquery 过滤器(first,last,not,even,odd)的使用和区别

    Jquery 过滤器主要有first,last,not,even,odd等等,它们分别表示: 代码如下: $(function(){ $("#menu li:first").cli ...

  2. 数据管理必看!Kendo UI for jQuery过滤器的全球化

    Kendo UI for jQuery最新试用版下载 Kendo UI目前最新提供Kendo UI for jQuery.Kendo UI for Angular.Kendo UI Support f ...

  3. 数据管理必看!Kendo UI for jQuery过滤器状态保持

    Kendo UI for jQuery最新试用版下载 Kendo UI目前最新提供Kendo UI for jQuery.Kendo UI for Angular.Kendo UI Support f ...

  4. 数据管理必看!Kendo UI for jQuery过滤器概述

    Kendo UI for jQuery最新试用版下载 Kendo UI目前最新提供Kendo UI for jQuery.Kendo UI for Angular.Kendo UI Support f ...

  5. jquery 过滤器

    1.基本选择器 基本选择器是JQuery中最常用的选择器,也是最简单的选择器,它通过元素id.class 和标签名来查找DOM元素.这个非常重要,下面的内容都是以此为基础,逐级提高的. 1).“$(“ ...

  6. 关键字搜索:jQuery过滤器插件fastLiveFilter||显示结果条数

    引用js库 <script src="jquery-1.6.4.min.js"></script> <script src="jquery. ...

  7. [ jquery 过滤器 hasClass(class) ] 此方法用于在选择器的基础之上检查当前的元素是否含有某个特定的类,如果有,则返回true

    此方法用于在选择器的基础之上检查当前的元素是否含有某个特定的类,如果有,则返回true 实例: <!DOCTYPE html> <html lang='zh-cn'> < ...

  8. 全局关键字搜索:Element UI Table内容过滤\jQuery过滤器fastLiveFilter插件\BootstrapVue插件;

    ```html data:{ resultMaster: [], otableData:[], schfilter:'' } watch: { schfilter: function(val, old ...

  9. 慕课网6-4 编程练习:jQuery选择器中的过滤器

    6-4 编程练习 结合所学的jQuery过滤器知识,实现如下图所示的隔行换色效果 任务 使用jQuery的.css()方法设置样式,语法css('属性 '属性值') 使用:odd和:even过滤器实现 ...

随机推荐

  1. LaTex学习笔记(一)

    1. 语法 命令 普通命令 环境 数据 注释 2. 物理结构 导言 指定文档类型,引入宏包,定义命令,环境等 \documentclass[options]{class} \usepackage[op ...

  2. 自己yy的Splay

    #include <iostream> #include <cstdio> #include <queue> using namespace std; ; stru ...

  3. Hbase系统架构

    HBase 系统架构 HBase是Apache Hadoop的数据库,能够对大型数据提供随机.实时的读写访问.HBase的目标是存储并处理大型的数据.HBase是一个开源的,分布式的,多版本的,面向列 ...

  4. JS Number对象

    数字属性 MAX_VALUE MIN_VALUE NEGATIVE_INFINITY POSITIVE_INFINITY NaN prototype constructor 数字方法 toExpone ...

  5. Codeforces Round #354 (Div. 2)-A

    A. Nicholas and Permutation 题目链接:http://codeforces.com/contest/676/problem/A Nicholas has an array a ...

  6. delphi 时间格式操作

    FormatDateTime('yyyy-mm-dd hh:nn:ss',Now) FormatDateTime('hh:mm:ss:zz',Now) if (TimeOf(now) < pub ...

  7. wpf,CollectionViewSource,使用数据过滤 筛选 功能。

    class TextListBoxVMpublic : ViewModelBase { public TextListBoxVMpublic() { var list = this.GetEmploy ...

  8. Linux 环境中普通用户启动Myeclipse出错

    将Myeclipse安装在/usr/local/myeclipse目录中,由root用户启动时没有问题,而用普通用户时出现如下故障: The configuration area at '/usr/l ...

  9. LightOJ1036 A Refining Company(DP)

    题目大概说有一个n*m的格子地图,每个格子有铀或者镭矿.地图最北面的镭矿加工厂,最西面有铀矿加工厂,而要通过在格子里铺设由南向北(镭)或由东向西(铀)的轨道来送矿物到加工厂.一个格子只能铺设一种轨道, ...

  10. Apache ActiveMQの版本更迭和Apache ActiveMQの故障转移

    本文描述apache activemq 版本更迭的原因以及Apache ActiveMQのThe Failover Transport new features in 5.2.0  1.对信息的传输/ ...