Skip to content
Permalink
Browse files

Tabs: Remove ui-tabs-aria-controls data on destroy.

  • Loading branch information...
scottgonzalez committed Nov 16, 2012
1 parent 8f46418 commit 23f7e30c77820904cc1813fc8b54b809b352a551
Showing with 7 additions and 2 deletions.
  1. +4 −1 tests/unit/tabs/tabs_methods.js
  2. +3 −1 ui/jquery.ui.tabs.js
@@ -6,10 +6,13 @@ var disabled = TestHelpers.tabs.disabled,
module( "tabs: methods" );

test( "destroy", function() {
expect( 1 );
expect( 2 );
domEqual( "#tabs1", function() {
$( "#tabs1" ).tabs().tabs( "destroy" );
});
domEqual( "#tabs2", function() {
$( "#tabs2" ).tabs().tabs( "destroy" );
});
});

test( "enable", function() {
@@ -710,7 +710,9 @@ $.widget( "ui.tabs", {
var li = $( this ),
prev = li.data( "ui-tabs-aria-controls" );
if ( prev ) {
li.attr( "aria-controls", prev );
li
.attr( "aria-controls", prev )
.removeData( "ui-tabs-aria-controls" );
} else {
li.removeAttr( "aria-controls" );
}

0 comments on commit 23f7e30

Please sign in to comment.
You can’t perform that action at this time.