diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-01-31 21:56:55 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-01-31 21:56:55 -0500 |
commit | bb857ddd8d6d4ac7620b49bf765352cd064494c0 (patch) | |
tree | d6556070fc3a15a7d4e24e67aca9746f45fb1c85 /ui | |
parent | 17004b9cac3eb87a72474b6d82d0f0063c23c269 (diff) | |
download | jquery-ui-bb857ddd8d6d4ac7620b49bf765352cd064494c0.tar.gz jquery-ui-bb857ddd8d6d4ac7620b49bf765352cd064494c0.zip |
Tabs: Use ._focusable() and ._hoverable().
Diffstat (limited to 'ui')
-rwxr-xr-x | ui/jquery.ui.tabs.js | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index 8ab3bdf40..21ad6ddec 100755 --- a/ui/jquery.ui.tabs.js +++ b/ui/jquery.ui.tabs.js @@ -254,28 +254,8 @@ $.widget( "ui.tabs", { // remove all handlers before, tabify may run on existing tabs after add or option change this.lis.add( this.anchors ).unbind( ".tabs" ); - if ( o.event !== "mouseover" ) { - var addState = function( state, el ) { - if ( el.is( ":not(.ui-state-disabled)" ) ) { - el.addClass( "ui-state-" + state ); - } - }; - var removeState = function( state, el ) { - el.removeClass( "ui-state-" + state ); - }; - this.lis.bind( "mouseover.tabs" , function() { - addState( "hover", $( this ) ); - }); - this.lis.bind( "mouseout.tabs", function() { - removeState( "hover", $( this ) ); - }); - this.anchors.bind( "focus.tabs", function() { - addState( "focus", $( this ).closest( "li" ) ); - }); - this.anchors.bind( "blur.tabs", function() { - removeState( "focus", $( this ).closest( "li" ) ); - }); - } + this._focusable( this.lis ); + this._hoverable( this.lis ); // set up animations var hideFx, showFx; @@ -431,15 +411,12 @@ $.widget( "ui.tabs", { return index; }, - destroy: function() { + _destroy: function() { var o = this.options; this.abort(); - this.element - .unbind( ".tabs" ) - .removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" ) - .removeData( "tabs" ); + this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" ); this.list.removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ); @@ -463,8 +440,6 @@ $.widget( "ui.tabs", { "ui-corner-top", "ui-tabs-selected", "ui-state-active", - "ui-state-hover", - "ui-state-focus", "ui-state-disabled", "ui-tabs-panel", "ui-widget-content", |