Opened 13 years ago
Closed 12 years ago
#5837 closed bug (fixed)
the :checked selector will select a select a option in Firefox
Reported by: | megaman | Owned by: | john |
---|---|---|---|
Priority: | major | Milestone: | 1.4.1 |
Component: | selector | Version: | 1.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
As the following code, it will alert "OPTION" when document ready.
<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http://www.w3.\ org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script> <script>
$(function(){
alert($(":checked", document).attr("nodeName"));
});
</script>
</head> <body>
<select>
<option>this is a option</option>
</select>
</body>
</html>
Change History (4)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
this bug happens when use :checked filter without element restriction, if use $("input:checked"), only checkbox and radio will be return.
sorry about the wrong title, it should be "THE :CHECKED SELECTOR WILL SELECT A OPTION ELEMENT IN FIREFOX"