Skip to content

:checked selector does not work for select elements #558

@jhfrench

Description

@jhfrench

On the ":checked Selector" page (http://api.jquery.com/checked-selector/), the description states:

"The :checked selector works for checkboxes, radio buttons, and select elements. For select elements only, use the :selected selector."

The :checked selector does not work on select elements. It works on the option children of select elements (see http://jsfiddle.net/jhfrench/mr7koj73/ for demonstration).

Suggest enumerating the destinction with this description:
"The :checked selector works for checkboxes, radio buttons, and "selected" options of select elements. For the selected options of select elements only, use the :selected selector."

I think it would also be a good idea to include a third example which illustrates using :checked with select/option elements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions