summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2011-04-16 17:43:44 +0200
committerFelix Nagel <info@felixnagel.com>2011-04-16 17:43:44 +0200
commitfc78c0d67fb1961252c721df90501ea85e53e375 (patch)
treefbf3127d5643087717ac9539e17e17ca3b916750
parent478749c789d3bed87835320658b0dd6c40bd5485 (diff)
downloadjquery-ui-fc78c0d67fb1961252c721df90501ea85e53e375.tar.gz
jquery-ui-fc78c0d67fb1961252c721df90501ea85e53e375.zip
fixed: small bug when using method disable with parameter 0, thx to scottriding, see https://github.com/fnagel/jquery-ui/pull/93
-rw-r--r--demos/selectmenu/disable_enable.html2
-rw-r--r--ui/jquery.ui.selectmenu.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/demos/selectmenu/disable_enable.html b/demos/selectmenu/disable_enable.html
index ac49e9e3b..f54d47870 100644
--- a/demos/selectmenu/disable_enable.html
+++ b/demos/selectmenu/disable_enable.html
@@ -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);
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js
index cfdafa979..9cd018477 100644
--- a/ui/jquery.ui.selectmenu.js
+++ b/ui/jquery.ui.selectmenu.js
@@ -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" ) {