Селектор :selected


Содержание:

selected selector

Описание: Selects all elements that are selected.

  • Добавлен в версии: 1.0jQuery( ":selected" )

The :selected selector works for <option> elements. It does not work for checkboxes or radio inputs; use :checked for them.

Дополнительные замечания:

  • Because :selected is a jQuery extension and not part of the CSS specification, queries using :selected cannot take advantage of the performance boost provided by the native DOM querySelectorAll() method. To achieve the best performance when using :selected to select elements, first select the elements using a pure CSS selector, then use .filter(":selected").