New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible bug in prop() documentation, regarding statement about checkbox state and attr() #288
Comments
Indeed, there are two parts in direct contradiction: ' $(elem).attr("checked") (1.6.1+) "checked" (String) Will change with checkbox state' 'The checked attribute value does not change with the state of the checkbox' The top one is correct in 1.8.3. Specifically, it switches between the string "checked" and undefined, depending on whether it's checked. |
Thanks! Yes, that needs to be corrected. It was changed to the correct behavior in 1.9/2.0. |
Seems to be still there. http://api.jquery.com/attr/ states:
Thus suggesting that in the latest stable version, the returned attr value does change with the live state. Aside from whether that's desirable, the current demo does not match this statement. The demo (using jQuery 1.10.2 as of writing) shows a constant value of "checked" regardless of the checkbox's state. I can reproduce the same behaviour in jQuery 2.1.3 (value unaffected by the live state). |
On this page:
http://api.jquery.com/prop/
this line of text seems wrong:
"$(elem).attr("checked") (1.6.1+) "checked" (String) Will change with checkbox state"
shouldn't this read, "Initial state of the checkbox; does not change" instead?
The Example just below it seems to support my opinion.
Jim
The text was updated successfully, but these errors were encountered: