summaryrefslogtreecommitdiffstats
path: root/js/jquery.multi-select.js
diff options
context:
space:
mode:
authorBerend <please@frique.me>2013-08-15 01:21:25 +0700
committerBerend <please@frique.me>2013-08-15 01:21:25 +0700
commit563d2e42cf43d7382647695b7eb5a14cb561a53c (patch)
tree48f7aa36dc2d091ac677abe978ed31e05578261f /js/jquery.multi-select.js
parentaa4622e8052d27e713c195d9ec2c8c63a4cb805e (diff)
downloadmulti-select-563d2e42cf43d7382647695b7eb5a14cb561a53c.zip
multi-select-563d2e42cf43d7382647695b7eb5a14cb561a53c.tar.gz
multi-select-563d2e42cf43d7382647695b7eb5a14cb561a53c.tar.bz2
Adds global state check for old IE (7) and makes clicking options work
Adds option (state) "isOldIE" which is set to true if $.browser is present and checks positive for ie7. Also makes clicking options work in ie7 (by replacing the click event with mouseup event which is the bizar fix).
Diffstat (limited to 'js/jquery.multi-select.js')
-rw-r--r--js/jquery.multi-select.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/js/jquery.multi-select.js b/js/jquery.multi-select.js
index cd394fb..5e952e2 100644
--- a/js/jquery.multi-select.js
+++ b/js/jquery.multi-select.js
@@ -73,6 +73,7 @@
that.activeKeyboard(that.$selectableUl);
var action = that.options.dblClick ? 'dblclick' : 'click';
+ if(action === 'click' && that.options.isOldIE){ action = 'mouseup'; }
that.$selectableUl.on(action, '.ms-elem-selectable', function(){
that.select($(this).data('ms-value'));
@@ -462,7 +463,9 @@
selectableOptgroup: false,
disabledClass : 'disabled',
dblClick : false,
- keepOrder: false
+ keepOrder: false,
+ // States:
+ isOldIE: (typeof $.browser==='object' && $.browser.msie && parseInt($.browser.version, 10) < 8) ? true : false
};
$.fn.multiSelect.Constructor = MultiSelect;