-
Notifications
You must be signed in to change notification settings - Fork 32
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
"checked" qualifier doesn't work on radio buttons #13
Comments
For what it's worth, my current workaround has been to use the values qualifier on a set of radio buttons, like so: $('#text_field').dependsOn( ...but it would be nice to simplify this to depend on the checked state of a specified element vs value-based dependency. |
Thanks for pointing that out. The documentation is incorrect. The |
This works if you want a specific value, but not if you want to check against unchecked. Rather than have to repeat all possible values (a maintenance headache and not very DRY), I should be able to use {not: [undefined]} (although I'm not sure jquery will normalize all browsers to undefined - better to check for null or empty string also). |
Please update documentation with this for radio buttons. Thanks to @srsanborn $('#some-element').dependsOn({
'input[name="radiogroup"]': { values: ['other'] }
}); |
The "checked" qualifier doesn't work on radio buttons as documented.
The text was updated successfully, but these errors were encountered: