diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2015-03-21 21:03:06 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2015-03-21 21:03:06 -0400 |
| commit | 61b3e2bc2b7b3b4abdd9c5738ea336dea903e90a (patch) | |
| tree | 6fbd6f61353fab2757370f259105c02e6a45813d /static | |
| parent | c8672196cd4f8e45667052274783a012e166923d (diff) | |
| download | wedding-website-61b3e2bc2b7b3b4abdd9c5738ea336dea903e90a.tar.gz | |
fixes
Diffstat (limited to 'static')
| -rw-r--r-- | static/wedding.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/static/wedding.js b/static/wedding.js index 415b613..015bc83 100644 --- a/static/wedding.js +++ b/static/wedding.js @@ -26,11 +26,12 @@ $("input:radio[name=language]").change(function(){ }); $("input:radio[name=answer]").change(function(){ var state = $(this).val()=="0"; - ["email", "mailing", "plusoneyes", "plusoneno", "plusonename", "kidsyes", - "kidsno", "kidsnames"]. + ["email", "mailing", "plusoneyes", "plusoneno", "kidsyes","kidsno"]. forEach(function(id){ $("#"+id).prop("disabled",state); - }) + }); + $("#plusonename").prop("disabled", $(this).val() || $("#plusoneno").prop("checked")); + $("#kidsnames").prop("disabled", $(this).val() || $("kidsno").prop("checked")); }); $("input:radio[name=plusone]").change(function(){ $("#plusonename").prop("disabled", $(this).val()=="0"); |
