Selectors JQ Home  <<  Selectors

Click a jQuery 3.5 Selectors signature in the table below to see in-depth information on it.

AlphabeticallyDescription
AttributeTop
Attribute Contains Prefix Selector [attr|="value"]
(Subcode Match)
Select all elements with the specified attribute name and a value equal to the specified string or prefixed with that string followed by a hyphen (-).
Attribute Contains Selector [attr*="value"]
(Substring Match)
Selects all elements with the specified attribute name and a value containing the specified string.
Attribute Contains Word Selector [attr~="value"]
(Word Match)
Selects all elements that have the specified attribute name with a value containing the specified word, delimited by spaces.
Attribute Ends With Selector [attr$="value"]
(Suffix Match)
Selects all elements that have the specified attribute name with an ending value matching the specified string. The comparison is case sensitive.
Attribute Equals Selector [attr="value"]
(Exact Match)
Selects all elements that have the specified attribute name with a value exactly equal to the specified value.
Attribute Not Equal Selector [attr!="value"]
(Attribute Value Non-Match)
Selects all elements that either don't have the specified attribute name, or do have the specified attribute but not with a value matching the specified string.
Attribute Starts With Selector [attr^="value"]
(Prefix Match)
Selects all elements that have the specified attribute name with a starting value matching the specified string.
Has Attribute Selector [attr]
(Attribute Match)
Selects all elements that have the specified attribute name.
Multiple Attribute Selector
[attr="value"][attrn="valuen"]
(Multiple Attribute Value Match)
Selects all elements that match all of the specified attribute and value filters
BasicTop
All Selector ("*")
(Universal Selector)
Universal selector to select all elements.
Class Selector (".class")
(Class Match)
Selects all elements that have the specified class.
Element Selector ("element")
(Element Match)
Selects all elements that have the specified tag name.
ID Selector ("#id")
(ID Match)
Selects a single element with the specified id attribute value.
Multiple Selector
("selector1, selector2, selectorn")
(Multiple Selector Match)
Selects all elements that match any of the specified selectors.
Basic FilterTop
:animated Selector
(Animating Match)
Selects all elements that are animating when the selector is run.
:eq() Selector
(Index Equal Match)
Selects the element at index n within the matched set.
:even Selector
(Even Numbered Index Match)
Selects even elements within the matched set.
:first Selector
(First Element Match)
Selects first matched element.
:gt() Selector
(Greater Than Index Match)
Select all elements with an index greater than the specified index within the matched set.
:header Selector
(Header Element Match)
Selects all header elements.
:lang Selector
(Structural Pseudo-class Match)
Selects all elements that match the specified language code.
:last Selector
(Last Element Match)
Selects last matched element.
:lt() Selector
(Less Than Index Match)
Select all elements with an index less than the specified index within the matched set.
:not() Selector
(Negation Pseudo-class Match)
Selects all elements that do not match the given selector(s).
:odd Selector
(Odd Numbered Index Match)
Selects odd elements within the matched set.
:root Selector
(Structural Pseudo-class Match)
Selects the root element of the document.
:target Selector
(Structural Pseudo-class Match)
Selects the target element indicated by the fragment identifier of the document URI.
Child FilterTop
:first-child Selector
(First Child Match)
Selects all first child elements of their parent.
:first-of-type Selector
(Structural Pseudo-class Match)
Selects all elements that are the first among siblings of the same element name.
:last-child Selector
(Structural Pseudo-class Match)
Selects all last child elements of their parent.
:last-of-type Selector
(Structural Pseudo-class Match)
Selects all elements that are the last among siblings of the same element name.
:nth-child() Selector
(Structural Pseudo-class Match)
Selects all elements that are the nth-child of the specified parent.
:nth-last-child() Selector
(Structural Pseudo-class Match)
Selects all elements that are the nth-child of the specified parent, counting from the last element to the first.
:nth-last-of-type Selector
(Structural Pseudo-class Match)
Selects all elements that are the last among siblings of the same element name, counting from the last element to the first.
:nth-of-type Selector
(Structural Pseudo-class Match)
Selects all elements that are the nth among siblings of the same element name.
:only-child Selector
(Structural Pseudo-class Match)
Selects all elements that are the only child of the specified parent.
:only-of-type Selector
(Structural Pseudo-class Match)
Selects all elements that have no siblings of the same element name.
Content FilterTop
:contains() Selector
(Text Match)
Select all elements containing the specified text.
:empty Selector
(Childless Match)
Select all childless elements.
Text nodes count as children.
:has() Selector
(Has Element Match)
Selects elements containing at least one element matching the specified selector.
:parent Selector
(Has Children Match)
Select all elements that are the parent of another element, including text nodes.
FormTop
:button Selector
(Form Button pseudo-class match)
Selects all button and type button elements.
:checkbox Selector
(Form Checkbox pseudo-class match)
Selects all elements of type checkbox.
:checked Selector
(UI element states pseudo-class Match)
Selects all checked elements.
:disabled Selector
(UI element states pseudo-class Match)
Selects all disabled elements.
:enabled Selector
(UI element states pseudo-class Match)
Selects all enabled elements.
:file Selector
(Form File pseudo-class match)
Selects all elements of type file.
:focus Selector
(Form Focus pseudo-class match)
Selects currently focused element.
:image Selector
(Form Image pseudo-class match)
Selects all elements of type image.
:input Selector
(Form Input pseudo-class match)
Selects all button, input, select and textarea elements.
:password Selector
(Form Password pseudo-class match)
Selects all elements of type password.
:radio Selector
(Form Radio pseudo-class match)
Selects all elements of type radio.
:reset Selector
(Form Reset pseudo-class match)
Selects all elements of type reset.
:selected Selector
(Form Selected pseudo-class match)
Selects all selected elements.
:submit Selector
(Form Submit pseudo-class match)
Selects all elements of type submit.
:text Selector
(Form Text pseudo-class match)
Selects all elements of type text.
HierarchyTop
Child Selector ("parent > child")
(Child Match)
Selects all the specified direct child elements of the specified parent element.
Descendant Selector ("ancestor descendant")
(Descendant Match)
Selects all specified descendant elements of the specified ancestor element.
Next Adjacent Selector ("previous + next")
(Adjacent Sibling Match)
Selects all specifed next sibling elements that are directly preceded by the specified previous sibling element.
Next Siblings Selector ("previous ~ siblings")
(General Sibling Match)
Selects all specified sibling elements that follow after the specified previous element and have the same parent.
Visibility FilterTop
:hidden Selector
(Hidden Element Match)
Selects all hidden elements.
:visible Selector
(Visible Element Match)
Selects all visible elements.