From 45c727d75e411d0330027162646bbb26c4f671f1 Mon Sep 17 00:00:00 2001 From: Scott González Date: Tue, 3 May 2011 06:31:12 -0400 Subject: Tabs: Fixed enabled and disabled methods. Fixes #7142 - Tabs: Deprecate enable and disable events. --- ui/jquery.ui.tabs.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index 7946cc667..39969d655 100755 --- a/ui/jquery.ui.tabs.js +++ b/ui/jquery.ui.tabs.js @@ -783,10 +783,11 @@ if ( $.uiBackCompat !== false ) { disable = prototype.disable; prototype.enable = function( index ) { - var o = this.options, + var options = this.options, trigger; - if ( index && o.disabled || ($.isArray( o.disabled ) && $.inArray( index, o.disabled ) !== -1 ) ) { + if ( index && options.disabled === true || + ( $.isArray( options.disabled ) && $.inArray( index, options.disabled ) !== -1 ) ) { trigger = true; } @@ -798,10 +799,11 @@ if ( $.uiBackCompat !== false ) { }; prototype.disable = function( index ) { - var o = this.options, + var options = this.options, trigger; - if ( index && !o.disabled || ($.isArray( o.disabled ) && $.inArray( index, o.disabled ) == -1 ) ) { + if ( index && options.disabled === false || + ( $.isArray( options.disabled ) && $.inArray( index, options.disabled ) === -1 ) ) { trigger = true; } -- cgit v1.2.3