다음의 Selector들은 CSS사양이 아니기 때문에 독립적인 사용만으로는 native DOM의 querySelectorAll()이 제공하는 속도향상을 기대할 수 없으므로, 우선 CSS Selector를 사용한 다음 .filter()를 적용하는 것이 좋다고 합니다.
※ 자세한 내용은 「2. Reference」참고하세요.
1. Extensions
: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 DOM 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 have at least one child node (either an element or text).
: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 input elements of type text.
:visible Selector
Selects all elements that are visible.
2. Reference
https://api.jquery.com/category/selectors/jquery-selector-extensions/
jQuery Extensions | jQuery API Documentation
Select all elements that are in the progress of an animation at the time the selector is run. Select elements that either don’t have the specified attribute, or do have the specified attribute but not with a certain value. Selects all button elements and
api.jquery.com
'JavaScript > jQuery' 카테고리의 다른 글
【jQuery/Selector #25】:first-of-type Selector (0) | 2023.02.24 |
---|---|
【jQuery/Selector #24】:first-child Selector (0) | 2023.02.23 |
【jQuery/Selector】universal selector ("*") (0) | 2023.02.23 |
【jQuery/Selector #23】:file Selector (0) | 2023.02.23 |
【jQuery/Selector #22】:even Selector (0) | 2023.02.23 |