]> source.dussan.org Git - jquery-ui.git/commitdiff
fixed: small bug when using method disable with parameter 0, thx to scottriding,...
authorFelix Nagel <info@felixnagel.com>
Sat, 16 Apr 2011 15:43:44 +0000 (17:43 +0200)
committerFelix Nagel <info@felixnagel.com>
Sat, 16 Apr 2011 15:43:44 +0000 (17:43 +0200)
demos/selectmenu/disable_enable.html
ui/jquery.ui.selectmenu.js

index ac49e9e3b8425f30b8fb5b96f763fa3f3a1369db..f54d47870258a31ccdac94b12dabac6e75b4da76 100644 (file)
@@ -57,7 +57,7 @@
                        var speedB2 = $('select#speedB2').selectmenu();                 
                        $("#optionSwitch").toggle(
                                function(){
-                                       speedB2.selectmenu("disable", 2);
+                                       speedB2.selectmenu("disable", 0);
                                }, 
                                function(){
                                        speedB2.selectmenu("enable", 2);
index cfdafa9790fed163ce04ee79be61c595de0c3237..9cd018477b5da7dcc26e4efe7c513c101b389355 100644 (file)
@@ -639,7 +639,7 @@ $.widget("ui.selectmenu", {
 
        disable: function(index, type){
                        //if options is not provided, call the parents disable function
-                       if ( !index ) { 
+                       if ( index === null ) { 
                                this._setOption( 'disabled', true );
                        } else {
                                if ( type == "optgroup" ) {