Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery :selected Selector

jQuery :selected Selector

jQuery selector jQuery selector

Example

Select the pre-selected items in a dropdown list:

$(":selected")

Try it »


Definition and Usage

The :selected selector selects pre-selected option elements.

**Note:** This selector does not apply to checkboxes or radio buttons. Please use the :checked selector instead.


Syntax

$(":selected")


jQuery selector jQuery selector