summaryrefslogtreecommitdiffstats
path: root/js/jquery.multi-select.js
diff options
context:
space:
mode:
authortop-flight <baranski@email.uscupstate.edu>2011-12-04 19:23:17 -0500
committertop-flight <baranski@email.uscupstate.edu>2011-12-04 19:23:17 -0500
commitf3d02044f9e0406c9f6f68174a4cbfad89e31738 (patch)
treeb4bd22e8b316323de477b696fe4280d03da87b13 /js/jquery.multi-select.js
parent2329db15ab4f38750bad2551011a59995a3acfd0 (diff)
downloadmulti-select-f3d02044f9e0406c9f6f68174a4cbfad89e31738.zip
multi-select-f3d02044f9e0406c9f6f68174a4cbfad89e31738.tar.gz
multi-select-f3d02044f9e0406c9f6f68174a4cbfad89e31738.tar.bz2
optgroup bug fix
Diffstat (limited to 'js/jquery.multi-select.js')
-rw-r--r--js/jquery.multi-select.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/js/jquery.multi-select.js b/js/jquery.multi-select.js
index f89147c..3fead7f 100644
--- a/js/jquery.multi-select.js
+++ b/js/jquery.multi-select.js
@@ -173,8 +173,10 @@
selectedLi = selectedUl.children('li[ms-value="'+value+'"]');
var parentOptgroup = selectableLi.parent('.ms-optgroup');
- if (parentOptgroup.length > 0)
- parentOptgroup.children('.ms-optgroup-label').show();
+ if (parentOptgroup.length > 0){
+ parentOptgroup.children('.ms-optgroup-label').addClass('collapse').show();
+ parentOptgroup.children('.ms-elem-selectable:not(.ms-selected)').show();
+ }
selectedOption.removeAttr('selected');
selectableLi.show();
selectableLi.removeClass('ms-selected');
@@ -193,6 +195,7 @@
},
'select_all' : function(){
var ms = this;
+ console.log(ms);
ms.find("option:not(option[value=''])").each(function(){
ms.multiSelect('select', $(this).val(), 'select_all');
});