diff options
-rw-r--r-- | js/jquery.multi-select.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/js/jquery.multi-select.js b/js/jquery.multi-select.js index 5c25713..fb478f5 100644 --- a/js/jquery.multi-select.js +++ b/js/jquery.multi-select.js @@ -84,7 +84,7 @@ ms.on('focus', function(){ that.$selectableUl.focus(); - }) + }); } var selectedValues = ms.find('option:selected').map(function(){ return $(this).val(); }).get(); @@ -149,22 +149,22 @@ $selectionOptgroup.append($(optgroupTpl)); if (that.options.selectableOptgroup){ $selectableOptgroup.find('.ms-optgroup-label').on('click', function(){ - var values = $optgroup.children(':not(:selected, :disabled)').map(function(){ return $(this).val() }).get(); + var values = $optgroup.children(':not(:selected, :disabled)').map(function(){ return $(this).val();}).get(); that.select(values); }); $selectionOptgroup.find('.ms-optgroup-label').on('click', function(){ - var values = $optgroup.children(':selected:not(:disabled)').map(function(){ return $(this).val() }).get(); + var values = $optgroup.children(':selected:not(:disabled)').map(function(){ return $(this).val();}).get(); that.deselect(values); }); } that.$selectableUl.append($selectableOptgroup); that.$selectionUl.append($selectionOptgroup); } - index = index == undefined ? $selectableOptgroup.find('ul').children().length : index + 1; + index = index === undefined ? $selectableOptgroup.find('ul').children().length : index + 1; selectableLi.insertAt(index, $selectableOptgroup.children()); selectedLi.insertAt(index, $selectionOptgroup.children()); } else { - index = index == undefined ? that.$selectableUl.children().length : index; + index = index === undefined ? that.$selectableUl.children().length : index; selectableLi.insertAt(index, that.$selectableUl); selectedLi.insertAt(index, that.$selectionUl); @@ -182,12 +182,12 @@ that.$element.find("option[value='"+option.value+"']").length === 0){ var $option = $('<option value="'+option.value+'">'+option.text+'</option>'), index = parseInt((typeof option.index === 'undefined' ? that.$element.children().length : option.index)), - $container = option.nested == undefined ? that.$element : $("optgroup[label='"+option.nested+"']") + $container = option.nested === undefined ? that.$element : $("optgroup[label='"+option.nested+"']"); $option.insertAt(index, $container); that.generateLisFromOption($option.get(0), index, option.nested); } - }) + }); }, 'escapeHTML' : function(text){ @@ -329,7 +329,7 @@ }); this.$container.on('mouseleave', that.elemsSelector, function () { - $(this).parents('.ms-container').find(that.elemsSelector).removeClass('ms-hover');; + $(this).parents('.ms-container').find(that.elemsSelector).removeClass('ms-hover'); }); }, @@ -341,7 +341,7 @@ 'destroy' : function(){ $("#ms-"+this.$element.attr("id")).remove(); this.$element.off('focus'); - this.$element.css('position', '').css('left', '') + this.$element.css('position', '').css('left', ''); this.$element.removeData('multiselect'); }, @@ -531,6 +531,6 @@ $parent.children().eq(index - 1).after(this); } }); -} +}; }(window.jQuery); |