mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Tabs: Remove ui-tabs-aria-controls data on destroy.
This commit is contained in:
parent
8f46418c35
commit
23f7e30c77
@ -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() {
|
||||
|
4
ui/jquery.ui.tabs.js
vendored
4
ui/jquery.ui.tabs.js
vendored
@ -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" );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user