Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#12704 closed bug (notabug)

:checked is considering drop down select also

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: selector Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


<select> <option value="0" selected="selected">Or</option> <option value="1">And</option> </select>

<select> <option value="0">Or</option> <option value="1">And</option> </select>

<input type="checkbox" checked="checked" />

<input type="checkbox" />



alert($(':checked').length+ ' ' + $(':checkbox:checked').length+' '+$(':selected').length);




3 1 2

Jsfiddle: http://jsfiddle.net/nanoquantumtech/SZFvC/

Change History (4)

comment:1 Changed 10 years ago by timmywil

Component: unfiledselector
Keywords: needsdocs added
Resolution: notabug
Status: newclosed

This is desired behavior and the design of the :checked selector.


However, this is a jQuery documentation issue. We will make an issue on api.jquery.com.

comment:2 Changed 10 years ago by mikesherov

Keywords: needsdocs removed

comment:3 Changed 10 years ago by timmywil

#12784 is a duplicate of this ticket.

comment:4 Changed 10 years ago by timmywil

FYI, documentation issue has been opened here: https://github.com/jquery/api.jquery.com/issues/99

Note: See TracTickets for help on using tickets.