This comma in your selector is equivalent to OR.
Use both conditions without a comma separating them inside is()
if ($('#search-form #valid_only').is(':checked:enabled') { // checked and enabled
...
}
Or, if you want to check :checked, :enabledand have a class name foo, you can do.foo:checked:enabled
source
share