The basic CSS Selectors supported by jQuery : css function « jQuery « JavaScript DHTML

Home
JavaScript DHTML
1.Ajax Layer
2.Data Type
3.Date Time
4.Development
5.Document
6.Dojo toolkit
7.Event
8.Event onMethod
9.Ext JS
10.Form Control
11.GUI Components
12.HTML
13.Javascript Collections
14.Javascript Objects
15.Javascript Properties
16.jQuery
17.Language Basics
18.Mochkit
19.Mootools
20.Node Operation
21.Object Oriented
22.Page Components
23.Rico
24.Scriptaculous
25.Security
26.SmartClient
27.Style Layout
28.Table
29.Utilities
30.Window Browser
31.YUI Library
JavaScript DHTML » jQuery » css function 
The basic CSS Selectors supported by jQuery
 


Selector                  Description
*                         Matches any element.
E                         Matches element with tag name E.
E F                       Matches elements with tag name F that are descendents of E.
E>F                       Matches elements with tag name F that are direct children of E.
E+F                       Matches elements F immediately preceded by sibling E.
E~F                       Matches elements F preceded by any sibling E.
E:has(F)                  Matches elements with tag name E that have at least one descendent with tag name F.
E.C                       Matches elements E with class name C. Omitting E is the same as *.C.
E#I                       Matches element E with id of I. Omitting E is the same as *#I.
E[A]                      Matches elements E with attribute A of any value.
E[A=V]                    Matches elements E with attribute A whose value is V.
E[A^=V]                   Matches elements E with attribute A whose value begins with V.
E[A$=V]                   Matches elements E with attribute A whose value ends with V.
E[A*=V]                   Matches elements E with attribute A whose value contains V.



$("p:even");                    selects all even <p> elements.
$("tr:nth-child(1)");           selects the first row of each table.
$("body > div");                selects direct <div> children of <body>.
$("a[href$=pdf]");              selects links to PDF files.
$("body > div:has(a)")          selects direct <div> children of <body>-containing links.

   
  
Related examples in the same category
1.Add border to DIV
2.Add paragraph and set the style
3.Define CSS in an array and set
4.Get CSS value
5.Set two CSS value in CSS function
6.Nested style setting
7.Use the rgb function with JQuery
8.Use CSS value when creating new tag
9.css(name): Return a style property on the matched element.
10.css(properties): set several style properties on matched elements.
11.css(name, value): If a number is provided, it is automatically converted into a pixel value.
12.Adds a background and text color to all the headers on the page.
13.Sets the background color of the page to black.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.