Chinaunix首页 | 论坛 | 博客
  • 博客访问: 761026
  • 博文数量: 140
  • 博客积分: 10288
  • 博客等级: 上将
  • 技术积分: 2895
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-03 13:19
文章分类

全部博文(140)

文章存档

2009年(50)

2008年(90)

我的朋友

分类: 系统运维

2009-03-23 11:56:28

API/1.3/Selectors

From jQuery JavaScript Library

(Redirected from )
Jump to: ,
NameType
Basics:
NameType
Returns: <>
Matches a single element with the given id attribute.
Returns: <(s)>
Matches all elements with the given name.
Returns: <(s)>
Matches all elements with the given class.
Returns: <(s)>
Matches all elements.
Returns: <(s)>
Matches the combined results of all the specified selectors.
Hierarchy:
NameType
Returns: <(s)>
Matches all descendant elements specified by "descendant" of elements specified by "ancestor".
Returns: <(s)>
Matches all child elements specified by "child" of elements specified by "parent".
Returns: <(s)>
Matches all next elements specified by "next" that are next to elements specified by "prev".
Returns: <(s)>
Matches all sibling elements after the "prev" element that match the filtering "siblings" selector.
Basic Filters:
NameType
Returns: <>
Matches the first selected element.
Returns: <>
Matches the last selected element.
Returns: <(s)>
Filters out all elements matching the given selector.
Returns: <(s)>
Matches even elements, zero-indexed.
Returns: <(s)>
Matches odd elements, zero-indexed.
Returns: <>
Matches a single element by its index.
Returns: <(s)>
Matches all elements with an index above the given one.
Returns: <(s)>
Matches all elements with an index below the given one.
Returns: <(s)>
Matches all elements that are headers, like h1, h2, h3 and so on.
Returns: <(s)>
Matches all elements that are currently being animated.
Content Filters:
NameType
Returns: <(s)>
Matches elements which contain the given text.
Returns: <(s)>
Matches all elements that have no children (including text nodes).
Returns: <(s)>
Matches elements which contain at least one element that matches the specified selector.
Returns: <(s)>
Matches all elements that are parents - they have child elements, including text.
Visibility Filters:
NameType
Returns: <(s)>
Matches all elements that are hidden.
Returns: <(s)>
Matches all elements that are visible.
Attribute Filters:Note: In jQuery 1.3 [@attr] style selectors were removed (they were previously deprecated in jQuery 1.2). Simply remove the '@' symbol from your selectors in order to make them work again.
NameType
Returns: <(s)>
Matches elements that have the specified attribute. Note the "@" before the attribute name was deprecated as of version 1.2.
Returns: <(s)>
Matches elements that have the specified attribute with a certain value.
Returns: <(s)>
Matches elements that either don't have the specified attribute or do have the specified attribute but not with a certain value.
Returns: <(s)>
Matches elements that have the specified attribute and it starts with a certain value.
Returns: <(s)>
Matches elements that have the specified attribute and it ends with a certain value.
Returns: <(s)>
Matches elements that have the specified attribute and it contains a certain value.
Returns: <(s)>
Matches elements that match all of the specified attribute filters.
Child Filters:
NameType
Returns: <(s)>
Matches all elements that are the nth-child of their parent or that are the parent's even or odd children.
Returns: <(s)>
Matches all elements that are the first child of their parent.
Returns: <(s)>
Matches all elements that are the last child of their parent.
Returns: <(s)>
Matches all elements that are the only child of their parent.
Forms:
NameType
Returns: <(s)>
Matches all input, textarea, select and button elements.
Returns: <(s)>
Matches all input elements of type text.
Returns: <(s)>
Matches all input elements of type password.
Returns: <(s)>
Matches all input elements of type radio.
Returns: <(s)>
Matches all input elements of type checkbox.
Returns: <(s)>
Matches all input elements of type submit.
:imageReturns: <(s)>
Matches all input elements of type image.
Returns: <(s)>
Matches all input elements of type reset.
Returns: <(s)>
Matches all button elements and input elements of type button.
Returns: <(s)>
Matches all input elements of type file.
Returns: <(s)>
Matches all elements that are hidden.
Form Filters:
NameType
Returns: <(s)>
Matches all elements that are enabled.
Returns: <(s)>
Matches all elements that are disabled.
Returns: <(s)>
Matches all elements that are checked.
Returns: <(s)>
Matches all elements that are selected.

Note: if you wish to use any of the meta-characters described above as a literal part of a name, you must escape the character with two backslashes (\). Quotes are optional in most cases, but should be used to avoid conflicts when the value contains characters like "]". For example:

#foo\\:bar
#foo\\[bar\\]
#foo\\.bar
阅读(593) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~