Side navigation
#12704 closed bug (notabug)
Opened October 11, 2012 01:05PM UTC
Closed October 15, 2012 04:02PM UTC
Last modified October 23, 2012 06:22PM UTC
:checked is considering drop down select also
Reported by: | thulasirams1986@gmail.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | selector | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
<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" />
==============================
$(document).ready(function(){
alert($(':checked').length+ ' ' + $(':checkbox:checked').length+' '+$(':selected').length);
});
==============================
Output:
3 1 2
Attachments (0)
Change History (4)
Changed October 15, 2012 04:02PM UTC by comment:1
component: | unfiled → selector |
---|---|
keywords: | → needsdocs |
resolution: | → notabug |
status: | new → closed |
Changed October 15, 2012 08:07PM UTC by comment:2
keywords: | needsdocs |
---|
Changed October 23, 2012 06:22PM UTC by comment:4
FYI, documentation issue has been opened here: https://github.com/jquery/api.jquery.com/issues/99
This is desired behavior and the design of the
:checked
selector.http://www.w3.org/TR/selectors/#checked
However, this is a jQuery documentation issue. We will make an issue on api.jquery.com.