jQuery Cheat Sheet
by
i3 Quest Inc (i3quest)
via
General
Functions
Hierarchy
*
All
:contains(text)
Elements that contain the
parent >
Direct child elements specified by
specified text.
child
"child" of elements specified by
element
Element
"parent".
:eq(n)
Element at index n within the
.class
Class
matched set.
ancestor
Elements that are descendants of
#id
ID
descendant
a given ancestor.
:gt(n)
Elements at an index greater
than n within the matched set.
selector1,
Combined results of all the
Attributes
selector2,
specified selectors.
:lt(n)
Elements at an index less than
[name]
Has Attribute
selectorN
index within the matched set.
[name|="value"]
Contains Prefix
prev + next
Next elements matching "next"
:has(selector)
Elements which contain at least
(before hyphen (-))
that are immediately preceded by
one element that matches the
a sibling "prev".
[name*="value"]
Contains
specified selector.
prev ~
Sibling elements that follow after
[name~="value"]
Contains Word
:not(selector)
Elements that do not match the
siblings
the "prev" element, have the same
given selector.
[name^="value"]
Starts With
parent, and match the filtering
:nth-child()
Elements that are the nth-child
[name$="value"]
Ends With
"siblings" selector.
of their parent.
[name="value"]
Equals
:first-child
Elements that are the first child of
:empty
Elements that have no children
their parent.
[name!="value"]
Not Equal
(including text nodes).
:last-child
Elements that are the last child of
[name="v"][name2="v2"]
Multiple Attributes
:even
Even elements, zero-indexed.
their parent.
:first
The first matched element.
Controls
:only-child
Elements that are the only child of
:header
Elements that are headers, like
their parent.
:button
Button
h1, h2, h3 and so on.
:parent
Elements that are the parent of
:checkbox
Checkbox
:last
The last matched element.
another element, including text
:submit
Submit
nodes.
:odd
Odd elements, zero-indexed.
:text
Text
:password
Password
Element State
:radio
Radio
:checked
Checked
:reset
Reset
:animated
Animated
:file
File
:disabled
Disabled
:image
Image
:enabled
Enabled
:input
input, textarea, select and button
:focus
Focused
elements
:selected
Selected
:visible
Visible
:hidden
Hidden
Cheatographer
Cheat Sheet
Sponsor
i3 Quest Inc (i3quest)
This cheat sheet was published on 24th December,
Envoy, for simple and effective bug management.
2011 and was last updated on 24th December,
Try it free!
2011.