This link has been bookmarked by 63 people . It was first bookmarked on 28 Mar 2007, by Greg Bird.
-
29 Sep 12
-
28 Nov 11
-
31 Oct 11
-
27 Sep 11
-
28 May 11
-
16 Feb 11
-
11 Feb 11
-
09 Dec 10
-
API/1.1.2/DOM/Traversing/Selectors
From jQuery JavaScript Library
(Redirected from DOM/Traversing/Selectors)Jump to: navigation, search<!-- start content -->This is an old version of the Selectors API:
View the Current APIjQuery selectors are a combination of CSS 1-3, XPath, plus some custom code to glue it together. Essentially, the best parts from both of these query languages were taken, combined, and used to create the final jQuery expression language. If you already know CSS (which most web developers do) then you're going to be fine.
If you are unsure about the general differences between the techniques discussed here, these articles in the English Wikipedia may help clarify a lot: XPath and [
Contents
[edit]Using CSS and XPath Together
This is a point of confusion, for some: How can you use CSS and XPath together, they're so different! jQuery makes some allowances to make this happen, but we think that developers will really appreciate the advantages of each language. Here are some examples:
Hide all Paragraph elements that contain a class attribute:
$("p[@class]").hide();Show the first paragraph on the page:
$("p:eq(0)").show();Hide all divs that are currently showing:
$("div:visible").hide();Get all list items that are children of an unordered list:
$("ul/li") /* valid too: $("ul > li") */Get
-
Get all Paragraphs, with a class of 'foo', that have a link in them:
$("p.foo[a]");
-
-
29 Mar 10
-
18 Mar 10
-
15 Mar 10
-
25 Jan 10
-
07 Dec 09
-
16 Oct 09
-
21 Sep 09
-
13 May 09
Query has full CSS 1-2 support and partial CSS 3 support, along with some custom CSS-like
css programming webdev reference javascript XPath DOM jquery selectors documentation ajax
-
21 Feb 09
-
08 Jan 09
-
07 Nov 08
-
17 Jul 08
-
25 Jun 08
-
12 Jun 08
-
14 Feb 08
-
07 Feb 08
-
03 Jan 08
-
13 Oct 07
-
12 Oct 07
-
24 Aug 07
-
23 Aug 07
-
03 Jul 07
-
02 Jul 07
-
22 Jun 07
-
16 May 07
-
16 Apr 07
Andre MalheirojQuery selectors are a combination of CSS 1-3, XPath, plus some custom code to glue it together. Essentially, the best parts from both of these query languages were taken, combined, and used to create the final jQuery expression language.
-
28 Mar 07
-
15 Mar 07
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.