diff options
author | parth | 2012-03-27 14:51:27 +0530 |
---|---|---|
committer | parth | 2012-03-27 14:51:27 +0530 |
commit | 93793c6e6043ede66e6a3a0e522333623daf7a95 (patch) | |
tree | 6809a65603d4c44eb2127bfcee2f0ea56084c753 | |
parent | 74b8df5840513c1df669ea05f670e5164b3440f3 (diff) | |
download | aloha-93793c6e6043ede66e6a3a0e522333623daf7a95.tar.gz aloha-93793c6e6043ede66e6a3a0e522333623daf7a95.tar.bz2 aloha-93793c6e6043ede66e6a3a0e522333623daf7a95.zip |
Now none can be selected in muliple dropdowns
-rw-r--r-- | template/allotter/apply.html | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/template/allotter/apply.html b/template/allotter/apply.html index 37249ec..7fe61cf 100644 --- a/template/allotter/apply.html +++ b/template/allotter/apply.html @@ -16,15 +16,17 @@ $(document).ready(function(){ <script> $(document).ready(function(){ $("select").change(function () { - var $this = $(this); - var prevVal = $this.data("prev"); - var otherSelects = $("select").not(this); - otherSelects.find("option[value=" + $(this).val() + "]").attr('disabled', true); - if (prevVal) { - otherSelects.find("option[value=" + prevVal + "]").attr('disabled', false); - } - - $this.data("prev", $this.val()); + if ($("select").val() !="0"){ + var $this = $(this); + var prevVal = $this.data("prev"); + var otherSelects = $("select").not(this); + otherSelects.find("option[value=" + $(this).val() + "]").attr('disabled', true); + if (prevVal) { + otherSelects.find("option[value=" + prevVal + "]").attr('disabled', false); + } + + $this.data("prev", $this.val()); + } }); }); </script> |