summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlou <louiscuny@gmail.com>2015-10-28 09:16:05 +0100
committerlou <louiscuny@gmail.com>2015-10-28 09:16:05 +0100
commit5bd126d1f7e01faa41401e7bb88641f3575900d7 (patch)
tree03d9b4d94aa759864c866f981b312aff01231ea2
parentbde7837e33f38ddeb560895606ccf1cbf352045c (diff)
downloadmulti-select-5bd126d1f7e01faa41401e7bb88641f3575900d7.zip
multi-select-5bd126d1f7e01faa41401e7bb88641f3575900d7.tar.gz
multi-select-5bd126d1f7e01faa41401e7bb88641f3575900d7.tar.bz2
use the current container to delegate mouse events
-rw-r--r--js/jquery.multi-select.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/js/jquery.multi-select.js b/js/jquery.multi-select.js
index f51211c..71d3b03 100644
--- a/js/jquery.multi-select.js
+++ b/js/jquery.multi-select.js
@@ -323,13 +323,13 @@
'activeMouse' : function($list){
var that = this;
- $('.ms-container').on('mouseenter', that.elemsSelector, function(){
+ this.$container.on('mouseenter', that.elemsSelector, function(){
$(this).parents('.ms-container').find(that.elemsSelector).removeClass('ms-hover');
$(this).addClass('ms-hover');
});
- $('.ms-container').on('mouseleave', that.elemsSelector, function () {
- $(this).parents('.ms-container').find(that.elemsSelector).removeClass('ms-hover');;
+ this.$container.on('mouseleave', that.elemsSelector, function () {
+ $(this).parents('.ms-container').find(that.elemsSelector).removeClass('ms-hover');;
});
},