JQuery Base/Expression/CSS:HOHO,超级好用的东西。

吕的部落格唯女子与小人为难养也近之则不孙远之则怨

JQuery Base/Expression/CSS

HOHO,超级好用的东西。

Base/Expression/CSS

jquery 支持CSS 1-3 , 还支持一些自定义的样式 (and XPath), as part of it's expression language.

为了能更好的运用CSS请阅读以下相关内容:

下面一此支持的CSS选择器描述(有些专业术语还是不会翻译).

Supported Selectors

  • * 任何元素
  • E  E类型的元素 <A href=....>类型为A:)
  • E:root an E element, root of the document
  • E:nth-child(n) an E element, the n-th child of its parent
  • E:nth-last-child(n) an E element, the n-th child of its parent, counting from the last one
  • E:nth-of-type(n) an E element, the n-th sibling of its type
  • E:nth-last-of-type(n) an E element, the n-th sibling of its type, counting from the last one
  • E:first-child an E element, first child of its parent
  • E:last-child an E element, last child of its parent
  • E:first-of-type an E element, first sibling of its type
  • E:last-of-type an E element, last sibling of its type
  • E:only-child an E element, only child of its parent
  • E:only-of-type an E element, only sibling of its type
  • E:empty an E element that has no children (including text nodes)
  • E:lang(fr) an element of type E in language "fr"
  • E:enabled
  • E:disabled a user interface element E which is enabled or disabled
  • E:checked a user interface element E which is checked (for instance a radio-button or checkbox)
  • E.warning an E element whose class is "warning"
  • E#myid an E element with ID equal to "myid".
  • E:not(s) an E element that does not match simple selector s
  • E F an F element descendant of an E element
  • E > F an F element child of an E element
  • E + F an F element immediately preceded by an E element
  • E ~ F an F element preceded by an E element

Supported, but different

All attribute selectors are written like their XPath counter-parts (in that all attributes should begin with an @ symbol).

  • E[@foo] an E element with a "foo" attribute
  • E[@foo=bar] an E element whose "foo" attribute value is exactly equal to "bar"
  • E[@foo^=bar] an E element whose "foo" attribute value begins exactly with the string "bar"
  • E[@foo$=bar] an E element whose "foo" attribute value ends exactly with the string "bar"
  • E[@foo*=bar] an E element whose "foo" attribute value contains the substring "bar"

Not supported

jquery only supports selectors that actually select DOM elements - everything else is ignored.

  • E:link
  • E:visited an E element being the source anchor of a hyperlink of which the target is not yet visited (:link) or already visited (:visited)
  • E:active
  • E:hover
  • E:focus an E element during certain user actions
  • E:target an E element being the target of the referring URI
  • E::first-line the first formatted line of an E element
  • E::first-letter the first formatted letter of an E element
  • E::selection the portion of an E element that is currently selected/highlighted by the user
  • E::before generated content before an E element
  • E::after generated content after an E element
所属分类:技术手册标签:JQueryAjax JQueryBase/Expression/CS 吕 @ 2006年10月29日10点55分 AM 编辑 JQuery Base/Expression/CSS阅读(2363) 评论(2)

相关文章

评论

注:部分评论不可见.
未开放评论

谷歌中JQuery Base/Expression/CSS相关文章

数据加载中,请稍候……