summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlou <louiscuny@gmail.com>2012-11-29 16:54:19 +0100
committerlou <louiscuny@gmail.com>2012-11-29 16:54:19 +0100
commita1c1bece008ba57cf9d29f35130cb3b68040680c (patch)
treedee3764569e70e0f330a432c601a24375a45ba5c
parent42215840f22c8687ad2466a19fac9f3140658706 (diff)
downloadmulti-select-a1c1bece008ba57cf9d29f35130cb3b68040680c.zip
multi-select-a1c1bece008ba57cf9d29f35130cb3b68040680c.tar.gz
multi-select-a1c1bece008ba57cf9d29f35130cb3b68040680c.tar.bz2
fix toggle of nested elements in optgroups. Use class .ms-selected instead of :hidden/:visible
-rw-r--r--js/jquery.multi-select.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/jquery.multi-select.js b/js/jquery.multi-select.js
index aaef6e2..2f909b7 100644
--- a/js/jquery.multi-select.js
+++ b/js/jquery.multi-select.js
@@ -250,7 +250,7 @@
var selectableOptgroup = selectableLi.parent('.ms-optgroup');
if (selectableOptgroup.length > 0)
- if (selectableOptgroup.children('.ms-elem-selectable:not(:hidden)').length == 1)
+ if (selectableOptgroup.children('.ms-elem-selectable:not(.ms-selected)').length == 1)
selectableOptgroup.children('.ms-optgroup-label').hide();
if (selectedLi.parent('.ms-optgroup').length > 0){
@@ -300,7 +300,7 @@
var selectionOptgroup = selectedLi.parent('.ms-optgroup');
- if (selectionOptgroup.children(':visible').length == 1){
+ if (selectionOptgroup.children('.ms-selected').length == 0){
selectionOptgroup.children('.ms-optgroup-label').hide();
}