jQuery :selected Selector (original) (raw)
Last Updated : 11 Jul, 2025
The **jQuery ****:selected selector** is used to select option elements that are pre-selected.
**Note: To retrieve only the check-boxes or radio buttons, use the :checked selector.
**Syntax:
$(":selected")
Below are examples that illustrate the ****:selected selector** in jQuery:
**Example 1: This example uses CSS property to all pre-selected elements. The background-color of pre-selected element is red, which is changed by:selected selector.
HTML `
jQuery | :selected Selector