diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/jquery.multi-select.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/js/jquery.multi-select.js b/js/jquery.multi-select.js index eb0e758..df74e12 100644 --- a/js/jquery.multi-select.js +++ b/js/jquery.multi-select.js @@ -187,11 +187,6 @@ e.stopPropagation(); that.moveHighlight($(this), (e.which === 38) ? -1 : 1); return; - case 32: - e.preventDefault(); - e.stopPropagation(); - that.selectHighlighted($list); - return; case 37: case 39: e.preventDefault(); @@ -199,6 +194,12 @@ that.switchList($list); return; } + if($.inArray(e.which, that.options.keySelect) > -1){ + e.preventDefault(); + e.stopPropagation(); + that.selectHighlighted($list); + return; + } }); }, @@ -459,6 +460,7 @@ }; $.fn.multiSelect.defaults = { + keySelect: [32], selectableOptgroup: false, disabledClass : 'disabled', dblClick : false, |