选择器~基本筛选

1.jQuery( ":animated" )

选择一个正在进行动画运动的节点

$("div:animated")

 

2.jQuery( ":eq(index)" )&jQuery( ":eq(-index)" )

选择指定的一个节点返回

$("td:eq(2)")

 

3.jQuery( ":even" )

选择索引为偶数的节点对象

$("tr:even")

 

3.jQuery( ":odd" )

选择索引为奇数的节点对象

$("tr:odd")

 

5.jQuery( ":first" )

选择第一个节点

$("tr:first")

 

6.jQuery( ":last" )

选择最后一个节点

$("tr:last")

 

7.jQuery( ":gt(index)" )

筛选出大于index索引值的所有节点

$("td:gt(4)")

[1,2,3,4,5,6]==>gt(2) ==>[4,5,6]

 

8.jQuery( ":lt(index)" )

筛选出小于index索引值的所有节点

$("td:it(3)")

[1,2,3,4,5,6]==>it(3) ==>[1,2,3]

 

9.jQuery( ":header" )

选择所有h(n)标签标题节点的节点(h1,h2,h3····)

$(":header")

 

10.jQuery( ":not(selector)" )

去除一个或多个指定的元素节点

$("input:not(:checked) + span")

未选中并且是他的相邻单个span节点

 

11.jQuery( ":root" )

选择根节点

$( ":root" )[0] ==》html节点  

 

 

posted @ 2013-06-24 22:58  抱.抱  阅读(187)  评论(0编辑  收藏  举报