JavaScript/jQuery

【jQuery/Extensions】jQuery Extensions

1Q74 2023. 2. 23. 14:56

다음의 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.

Also in: Selectors > Attribute

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.

Also in: Selectors > Form

:button Selector

Selects all button elements and elements of type button.

Also in: Selectors > Form

: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.

Also in: Selectors > Form

: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.

Also in: Selectors > Basic Filter

:header Selector

Selects all elements that are headers, like h1, h2, h3 and so on.

:hidden Selector

Selects all elements that are hidden.

Also in: Selectors > Form

:image Selector

Selects all elements of type image.

Also in: Selectors > Form

: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).

Also in: Selectors > Form

:password Selector

Selects all elements of type password.

Also in: Selectors > Form

:radio Selector

Selects all elements of type radio.

Also in: Selectors > Form

:reset Selector

Selects all elements of type reset.

Also in: Selectors > Form

:selected Selector

Selects all elements that are selected.

Also in: Selectors > Form

:submit Selector

Selects all elements of type submit.

Also in: Selectors > Form

: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