summaryrefslogtreecommitdiffstats
path: root/js/jquery.multi-select.js
diff options
context:
space:
mode:
authorlou <louiscuny@gmail.com>2012-12-06 11:29:25 +0100
committerlou <louiscuny@gmail.com>2012-12-06 11:29:25 +0100
commita0dd99874f25dcd7713fa9427f1dc5036c6c4c16 (patch)
tree5dd93ed372dc44a3aa851545558c33157a643eed /js/jquery.multi-select.js
parent210e4560684872b82ab52c83b4dbb339b072159c (diff)
downloadmulti-select-a0dd99874f25dcd7713fa9427f1dc5036c6c4c16.zip
multi-select-a0dd99874f25dcd7713fa9427f1dc5036c6c4c16.tar.gz
multi-select-a0dd99874f25dcd7713fa9427f1dc5036c6c4c16.tar.bz2
fix specs
Diffstat (limited to 'js/jquery.multi-select.js')
-rw-r--r--js/jquery.multi-select.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/js/jquery.multi-select.js b/js/jquery.multi-select.js
index f5bf22b..933ee09 100644
--- a/js/jquery.multi-select.js
+++ b/js/jquery.multi-select.js
@@ -117,22 +117,19 @@
$('li', that.$container).removeClass('ms-hover');
});
- var selectableValue = $(this).attr('id').replace(/-selectable/, ''),
- selectionValue = $(this).attr('id').replace(/-selection/, '');
-
if(that.options.dblClick) {
that.$selectableUl.on('dblclick', '.ms-elem-selectable', function(){
- that.select(selectableValue);
+ that.select($(this).attr('id').replace(/-selectable/, ''));
});
that.$selectionUl.on('dblclick', '.ms-elem-selection', function(){
- that.deselect(selectionValue);
+ that.deselect($(this).attr('id').replace(/-selection/, ''));
});
} else {
that.$selectableUl.on('click', '.ms-elem-selectable', function(){
- that.select(selectableValue);
+ that.select($(this).attr('id').replace(/-selectable/, ''));
});
that.$selectionUl.on('click', '.ms-elem-selection', function(){
- that.deselect(selectionValue);
+ that.deselect($(this).attr('id').replace(/-selection/, ''));
});
}
@@ -242,7 +239,7 @@
var that = this,
ms = this.$element,
selectables = this.$selectableUl.find('#' + value.join('-selectable, #')+'-selectable').filter(':not(.'+that.options.disabledClass+')'),
- selections = this.$selectionUl.find('#' + value.join('-selection, #')+'-selection'),
+ selections = this.$selectionUl.find('#' + value.join('-selection, #') + '-selection'),
options = ms.find('option:val('+value +')');
if (selectables.length > 0){