diff options
author | lou <louiscuny@gmail.com> | 2012-12-06 11:29:25 +0100 |
---|---|---|
committer | lou <louiscuny@gmail.com> | 2012-12-06 11:29:25 +0100 |
commit | a0dd99874f25dcd7713fa9427f1dc5036c6c4c16 (patch) | |
tree | 5dd93ed372dc44a3aa851545558c33157a643eed /js/jquery.multi-select.js | |
parent | 210e4560684872b82ab52c83b4dbb339b072159c (diff) | |
download | multi-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.js | 13 |
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){ |