diff options
author | top-flight <baranski@email.uscupstate.edu> | 2011-12-04 19:23:17 -0500 |
---|---|---|
committer | top-flight <baranski@email.uscupstate.edu> | 2011-12-04 19:23:17 -0500 |
commit | f3d02044f9e0406c9f6f68174a4cbfad89e31738 (patch) | |
tree | b4bd22e8b316323de477b696fe4280d03da87b13 /js/jquery.multi-select.js | |
parent | 2329db15ab4f38750bad2551011a59995a3acfd0 (diff) | |
download | multi-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.js | 7 |
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'); }); |