Side navigation
#4062 closed bug (invalid)
Opened February 04, 2009 12:50PM UTC
Closed February 05, 2009 12:23AM UTC
1.3.1 always select first 'checked' <input> whatever the attribute filter
Reported by: | p3consulting | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.3.2 |
Component: | core | Version: | 1.3.1 |
Keywords: | selector input checked | Cc: | |
Blocked by: | Blocking: |
Description
The following code :
function testJQuery(theForm)
{
var gender = $("input[@name='gender']:checked").val() ;
var other = $("input[@name='other']:checked").val() ;
$("#result").html(jQuery.fn.jquery + "=" + gender + "/" + other) ;
return false ;
}
with the related <input> fields in a <form> :
<input type="radio" name="gender" value="F" checked />F
<input type="radio" name="gender" value="M" />M
<input type="radio" name="other" value="A" checked />A
<input type="radio" name="other" value="B" />B
produced the following output with version 1.3.1 :
1.3.1=F/F
while the correct answer is given by 1.2.6 :
1.2.6=F/A
Attachments (0)
Change History (1)
Changed February 05, 2009 12:23AM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
Your attribute selector is invalid; the @ symbol isn't valid in jQuery 1.3. It works fine once you remove the @.