mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Tabs: jQuery <1.7.2 treats .data() as a getter if the value to set is undefined.
This commit is contained in:
parent
aa1e8b5e6c
commit
4866182dee
16
ui/jquery.ui.tabs.js
vendored
16
ui/jquery.ui.tabs.js
vendored
@ -384,7 +384,8 @@ $.widget( "ui.tabs", {
|
||||
this.anchors.each(function( i, anchor ) {
|
||||
var selector, panel, panelId,
|
||||
anchorId = $( anchor ).uniqueId().attr( "id" ),
|
||||
tab = $( anchor ).closest( "li" );
|
||||
tab = $( anchor ).closest( "li" ),
|
||||
originalAriaControls = tab.attr( "aria-controls" );
|
||||
|
||||
// inline tab
|
||||
if ( isLocal( anchor ) ) {
|
||||
@ -405,12 +406,13 @@ $.widget( "ui.tabs", {
|
||||
if ( panel.length) {
|
||||
that.panels = that.panels.add( panel );
|
||||
}
|
||||
tab
|
||||
.data( "ui-tabs-aria-controls", tab.attr( "aria-controls" ) )
|
||||
.attr({
|
||||
"aria-controls": selector.substring( 1 ),
|
||||
"aria-labelledby": anchorId
|
||||
});
|
||||
if ( originalAriaControls ) {
|
||||
tab.data( "ui-tabs-aria-controls", originalAriaControls );
|
||||
}
|
||||
tab.attr({
|
||||
"aria-controls": selector.substring( 1 ),
|
||||
"aria-labelledby": anchorId
|
||||
});
|
||||
panel.attr( "aria-labelledby", anchorId );
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user