[jQuery]
1 2 3 4 5 6 7 8 9 10 |
$('input[type=radio][name=ldap-sync-type]').change(function() { if (this.value == '0') { $("select[name=day-option]").prop("disabled", true); $("select[name=clock-option]").prop("disabled", true); } else if (this.value == '1') { $("select[name=day-option]").prop("disabled", false); $("select[name=clock-option]").prop("disabled", false); } }); |
[JavaScript]
1 2 3 4 5 6 7 8 9 10 |
$('input[type=radio][name=ldap-sync-type]').change(function() { if (this.value == '0') { $("select[name=day-option]").attr("disabled", "disabled"); $("select[name=clock-option]").attr("disabled", "disabled"); } else if (this.value == '1') { $("select[name=day-option]").removeAttr("disabled"); $("select[name=clock-option]").removeAttr("disabled"); } }); |