summaryrefslogtreecommitdiffstats
path: root/js/jquery.multi-select.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/jquery.multi-select.js')
-rw-r--r--js/jquery.multi-select.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/js/jquery.multi-select.js b/js/jquery.multi-select.js
index 0ceb993..d694cf4 100644
--- a/js/jquery.multi-select.js
+++ b/js/jquery.multi-select.js
@@ -121,8 +121,13 @@
that.$selectionUl.find('.ms-optgroup-label').hide();
if ($(this).prop('disabled') || ms.prop('disabled')){
- selectableLi.prop('disabled', true);
- selectableLi.addClass(that.options.disabledClass);
+ if (this.selected) {
+ selectedLi.prop('disabled', true);
+ selectedLi.addClass(that.options.disabledClass);
+ } else {
+ selectableLi.prop('disabled', true);
+ selectableLi.addClass(that.options.disabledClass);
+ }
}
if (optgroupId){
@@ -266,7 +271,7 @@
} else {
that.$selectableUl.focusin();
that.$selectionUl.focusout();
- }
+ }
}
}
@@ -421,7 +426,7 @@
$.fn.multiSelect = function () {
var option = arguments[0],
args = arguments;
-
+
return this.each(function () {
var $this = $(this),
data = $this.data('multiselect'),