index

Chapter 2

add(expression,context)
andSelf()
attr(name)
children([selector]) Returns a wrapped set consisting of all unique children of the wrapped elements.
closest([selector]) Returns a wrapped set containing the single nearest ancestor that matches the passed expression, if any.
contents()Returns a wrapped set of the contents of the elements, which may include text nodes, in the wrapped set. (This is frequently used to obtain the contents of <iframe> elements.)
each(iterator)
end()
eq(index)
filter(expression)
find(selector)
first()
get(index)
has(test)
index(element)
is(selector)
last()
map(callback)
next([selector]) Returns a wrapped set consisting of all unique next siblings of the wrapped elements.
nextAll([selector]) Returns a wrapped set containing all the following siblings of the wrapped elements.
nextUntil([selector])Returns a wrapped set of all the following siblings of the elements of the wrapped elements until, but not including, the element matched by the selector. If no matches are made to the selector, or if the selector is omitted, all following siblings are selected.
not(expression)
offsetParent() Returns a wrapped set containing the closest relatively or absolutely positioned parent of the first element in the wrapped set.
parent([selector])Returns a wrapped set consisting of the unique direct parents of all wrapped elements.
parents([selector]) Returns a wrapped set consisting of the unique ancestors of all wrapped elements. This includes the direct parents as well as the remaining ancestors all the way up to, but not including, the document root.
parentsUntil([selector]) Returns a wrapped set of all ancestors of the elements of the wrapped elements up until, but not including, the element matched by the selector. If no matches are made to the selector, or if the selector is omitted, all ancestors are selected.
prev([selector]) Returns a wrapped set consisting of all unique previous siblings of the wrapped elements.
prevAll([selector]) Returns a wrapped set containing all the previous siblings of the wrapped elements.
prevUntil([selector]) Returns a wrapped set of all preceding siblings of the elements of the wrapped elements until, but not including, the element matched by the selector. If no matches are made to the selector, or if the selector is omitted, all previous siblings are selected.
siblings([selector]) Returns a wrapped set consisting of all unique siblings of the wrapped elements.
size()
slice(begin,end)
toArray()
----------------------------------------------------------------------------------------
* Matches any element.
E Matches all elements with tag name E.
E F Matches all elements with tag name F that are descendants of E.
E>F Matches all elements with tag name F that are direct children of E.
E+F Matches all elements with tag name F that are immediately preceded by sibling E.
E~F Matches all elements with tag name F preceded by any sibling E.
E.C Matches all elements with tag name E with class name C. Omitting E is the same as *.C.
E#I Matches all elements with tag name E with the id of I. Omitting E is the same as *#I.
E[A] Matches all elements with tag name E that have attribute A of any value.
E[A=V] Matches all elements with tag name E that have attribute A whose value is exactly V.
E[A^=V] Matches all elements with tag name E that have attribute A whose value starts with V.
E[A$=V] Matches all elements with tag name E that have attribute A whose value ends with V.
E[A!=V] Matches all elements with tag name E that have attribute A whose value doesn't match the value V, or that lack attribute A completely.
E[A*=V] Matches all elements with tag name E that have attribute A whose value contains V.
:first Matches the first match within the context. li a:first returns the first link that's a descendant of a list item.
:last Matches the last match within the context. li a:last returns the last link that's a descendant of a list item.
:first-child Matches the first child element within the context. li:first-child returns the first list item of each list.
:last-child Matches the last child element within the context. li:last-child returns the last list item of each list.
:only-child Returns all elements that have no siblings.
:nth-child(n) Matches the nth child element within the context. li:nth-child(2) returns the second list item of each list.
:nth-child(even|odd) Matches even or odd children within the context. li:nthchild(even) returns the even list items of each list.
:nth-child(Xn+Y) Matches the nth child element computed by the supplied formula. If Y is 0, it may be omitted. li:nth-child(3n) returns every third list item, whereas li:nth-child(5n+1) returns the item after every fifth element.
:even Matches even elements within the context. li:even returns every even list item.
:odd Matches odd elements within the context. li:odd returns every odd list item.
:eq(n) Matches the nth matching element.
:gt(n) Matches matching elements after and excluding the nth matching element.
:lt(n) Matches matching elements before and excluding the nth matching element.
:animated Selects only elements that are currently under animated control. Chapter 5 will cover animations and effects.
:button Selects only button elements (input[type=submit], input[type=reset], input[type=button], or button).
:checkbox Selects only checkbox elements (input[type=checkbox]).
:checked Selects only checkboxes or radio elements in checked state.
:contains(food) Selects only elements containing the text food.
:disabled Selects only elements in disabled state.
:enabled Selects only elements in enabled state.
:file Selects only file input elements (input[type=file]).
:has(selector) Selects only elements that contain at least one element that matches the specified selector.
:header Selects only elements that are headers; for example, <h1> through <h6> elements.
:hidden Selects only elements that are hidden.
:image Selects only image input elements (input[type=image]).
:input Selects only form elements (input, select, textarea, button).
:not(selector) Negates the specified selector.
:parent Selects only elements that have children (including text), but not empty elements.
:password Selects only password elements (input[type=password]).
:radio Selects only radio elements (input[type=radio]).
:reset Selects only reset buttons (input[type=reset] or button[type=reset]).
:selected Selects only <option> elements that are in selected state.
:submit Selects only submit buttons (button[type=submit] or input[type=submit]).
:visible Selects only elements that are visible.
:text Selects only text elements (input[type=text]).