summaryrefslogtreecommitdiffstats
path: root/js/jquery.multi-select.js
diff options
context:
space:
mode:
authorSerophos <thees79@googlemail.com>2011-05-05 02:34:02 -0700
committerSerophos <thees79@googlemail.com>2011-05-05 02:34:02 -0700
commit0896c9b0796a57992ff6605fcb6214408fb45ab3 (patch)
tree9b3ca1c740ce35924c99b7500e332eaf568088e6 /js/jquery.multi-select.js
parentf2bc60b72dff6373d28f987cf8e84f3d0f9fcf2b (diff)
downloadmulti-select-0896c9b0796a57992ff6605fcb6214408fb45ab3.zip
multi-select-0896c9b0796a57992ff6605fcb6214408fb45ab3.tar.gz
multi-select-0896c9b0796a57992ff6605fcb6214408fb45ab3.tar.bz2
Silence Javascript warnings
Diffstat (limited to 'js/jquery.multi-select.js')
-rw-r--r--js/jquery.multi-select.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/js/jquery.multi-select.js b/js/jquery.multi-select.js
index 7b11012..c9ed0a7 100644
--- a/js/jquery.multi-select.js
+++ b/js/jquery.multi-select.js
@@ -23,7 +23,7 @@
ms.data('settings', multiSelects.settings);
ms.children('option').each(function(){
- //alert($(this).val('title'));
+
var selectableLi = $('<li ms-value="'+$(this).val()+'" title="' + $(this).attr('title') + '">'+$(this).text()+'</li>').detach();
selectableLi.click(function(){
@@ -76,7 +76,7 @@
var ms = this,
msValues = (ms.val() ? ms.val() : []),
present = false,
- newValues = $.map(msValues, function(e){ if(e != value){ return e; }else{ present = true}});
+ newValues = $.map(msValues, function(e){ if(e != value){ return e; }else{ present = true} return false;});
if(present){
var selectableUl = $('#ms-'+ms.attr('id')+' .ms-selectable ul'),
@@ -104,7 +104,7 @@
ms.multiSelect('deselect', $(this).val(), 'deselect_all');
});
}
- }
+ };
$.fn.multiSelect = function(method){
if ( msMethods[method] ) {
@@ -114,5 +114,6 @@
} else {
if(console.log) console.log( 'Method ' + method + ' does not exist on jquery.multiSelect' );
}
- }
+ return false;
+ };
})(jQuery); \ No newline at end of file