jQuery Extensions
jQuery has extended the CSS3 selectors with the following selectors. Because these selectors are jQuery extension and not part of the CSS specification, queries using them cannot take advantage of the performance boost provided by the native DOM querySelectorAll()
method. To achieve the best performance when using these selectors, first select some elements using a pure CSS selector, then use .filter()
.
-
:animated Selector
Select all elements that are in the progress of an animation at the time the selector is run.
-
Attribute Not Equal Selector [name!="value"]
Select elements that either don't have the specified attribute, or do have the specified attribute but not with a certain value.
-
:button Selector
Selects all button elements and elements of type button.
-
:checkbox Selector
Selects all elements of type checkbox.
-
:eq() Selector
Select the element at index
n
within the matched set. -
:even Selector
Selects even elements, zero-indexed. See also odd.
-
:file Selector
Selects all elements of type file.
-
:first Selector
Selects the first matched element.
-
:gt() Selector
Select all elements at an index greater than
index
within the matched set. -
:has() Selector
Selects elements which contain at least one element that matches the specified selector.
-
:header Selector
Selects all elements that are headers, like h1, h2, h3 and so on.
-
:hidden Selector
Selects all elements that are hidden.
-
:image Selector
Selects all elements of type image.
-
:input Selector
Selects all input, textarea, select and button elements.
-
:last Selector
Selects the last matched element.
-
:lt() Selector
Select all elements at an index less than
index
within the matched set. -
:odd Selector
Selects odd elements, zero-indexed. See also even.
-
:parent Selector
Select all elements that are the parent of another element, including text nodes.
-
:password Selector
Selects all elements of type password.
-
:radio Selector
Selects all elements of type radio.
-
:reset Selector
Selects all elements of type reset.
-
:selected Selector
Selects all elements that are selected.
-
:submit Selector
Selects all elements of type submit.
-
:text Selector
Selects all elements of type text.
-
:visible Selector
Selects all elements that are visible.