Edit File by line
/home/barbar84/public_h.../wp-inclu.../js/jquery/ui
File: tabs.js
/*!
[0] Fix | Delete
* jQuery UI Tabs 1.12.1
[1] Fix | Delete
* http://jqueryui.com
[2] Fix | Delete
*
[3] Fix | Delete
* Copyright jQuery Foundation and other contributors
[4] Fix | Delete
* Released under the MIT license.
[5] Fix | Delete
* http://jquery.org/license
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
//>>label: Tabs
[9] Fix | Delete
//>>group: Widgets
[10] Fix | Delete
//>>description: Transforms a set of container elements into a tab structure.
[11] Fix | Delete
//>>docs: http://api.jqueryui.com/tabs/
[12] Fix | Delete
//>>demos: http://jqueryui.com/tabs/
[13] Fix | Delete
//>>css.structure: ../../themes/base/core.css
[14] Fix | Delete
//>>css.structure: ../../themes/base/tabs.css
[15] Fix | Delete
//>>css.theme: ../../themes/base/theme.css
[16] Fix | Delete
[17] Fix | Delete
( function( factory ) {
[18] Fix | Delete
if ( typeof define === "function" && define.amd ) {
[19] Fix | Delete
[20] Fix | Delete
// AMD. Register as an anonymous module.
[21] Fix | Delete
define( [
[22] Fix | Delete
"jquery",
[23] Fix | Delete
"./core"
[24] Fix | Delete
], factory );
[25] Fix | Delete
} else {
[26] Fix | Delete
[27] Fix | Delete
// Browser globals
[28] Fix | Delete
factory( jQuery );
[29] Fix | Delete
}
[30] Fix | Delete
}( function( $ ) {
[31] Fix | Delete
[32] Fix | Delete
$.widget( "ui.tabs", {
[33] Fix | Delete
version: "1.12.1",
[34] Fix | Delete
delay: 300,
[35] Fix | Delete
options: {
[36] Fix | Delete
active: null,
[37] Fix | Delete
classes: {
[38] Fix | Delete
"ui-tabs": "ui-corner-all",
[39] Fix | Delete
"ui-tabs-nav": "ui-corner-all",
[40] Fix | Delete
"ui-tabs-panel": "ui-corner-bottom",
[41] Fix | Delete
"ui-tabs-tab": "ui-corner-top"
[42] Fix | Delete
},
[43] Fix | Delete
collapsible: false,
[44] Fix | Delete
event: "click",
[45] Fix | Delete
heightStyle: "content",
[46] Fix | Delete
hide: null,
[47] Fix | Delete
show: null,
[48] Fix | Delete
[49] Fix | Delete
// Callbacks
[50] Fix | Delete
activate: null,
[51] Fix | Delete
beforeActivate: null,
[52] Fix | Delete
beforeLoad: null,
[53] Fix | Delete
load: null
[54] Fix | Delete
},
[55] Fix | Delete
[56] Fix | Delete
_isLocal: ( function() {
[57] Fix | Delete
var rhash = /#.*$/;
[58] Fix | Delete
[59] Fix | Delete
return function( anchor ) {
[60] Fix | Delete
var anchorUrl, locationUrl;
[61] Fix | Delete
[62] Fix | Delete
anchorUrl = anchor.href.replace( rhash, "" );
[63] Fix | Delete
locationUrl = location.href.replace( rhash, "" );
[64] Fix | Delete
[65] Fix | Delete
// Decoding may throw an error if the URL isn't UTF-8 (#9518)
[66] Fix | Delete
try {
[67] Fix | Delete
anchorUrl = decodeURIComponent( anchorUrl );
[68] Fix | Delete
} catch ( error ) {}
[69] Fix | Delete
try {
[70] Fix | Delete
locationUrl = decodeURIComponent( locationUrl );
[71] Fix | Delete
} catch ( error ) {}
[72] Fix | Delete
[73] Fix | Delete
return anchor.hash.length > 1 && anchorUrl === locationUrl;
[74] Fix | Delete
};
[75] Fix | Delete
} )(),
[76] Fix | Delete
[77] Fix | Delete
_create: function() {
[78] Fix | Delete
var that = this,
[79] Fix | Delete
options = this.options;
[80] Fix | Delete
[81] Fix | Delete
this.running = false;
[82] Fix | Delete
[83] Fix | Delete
this._addClass( "ui-tabs", "ui-widget ui-widget-content" );
[84] Fix | Delete
this._toggleClass( "ui-tabs-collapsible", null, options.collapsible );
[85] Fix | Delete
[86] Fix | Delete
this._processTabs();
[87] Fix | Delete
options.active = this._initialActive();
[88] Fix | Delete
[89] Fix | Delete
// Take disabling tabs via class attribute from HTML
[90] Fix | Delete
// into account and update option properly.
[91] Fix | Delete
if ( $.isArray( options.disabled ) ) {
[92] Fix | Delete
options.disabled = $.unique( options.disabled.concat(
[93] Fix | Delete
$.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
[94] Fix | Delete
return that.tabs.index( li );
[95] Fix | Delete
} )
[96] Fix | Delete
) ).sort();
[97] Fix | Delete
}
[98] Fix | Delete
[99] Fix | Delete
// Check for length avoids error when initializing empty list
[100] Fix | Delete
if ( this.options.active !== false && this.anchors.length ) {
[101] Fix | Delete
this.active = this._findActive( options.active );
[102] Fix | Delete
} else {
[103] Fix | Delete
this.active = $();
[104] Fix | Delete
}
[105] Fix | Delete
[106] Fix | Delete
this._refresh();
[107] Fix | Delete
[108] Fix | Delete
if ( this.active.length ) {
[109] Fix | Delete
this.load( options.active );
[110] Fix | Delete
}
[111] Fix | Delete
},
[112] Fix | Delete
[113] Fix | Delete
_initialActive: function() {
[114] Fix | Delete
var active = this.options.active,
[115] Fix | Delete
collapsible = this.options.collapsible,
[116] Fix | Delete
locationHash = location.hash.substring( 1 );
[117] Fix | Delete
[118] Fix | Delete
if ( active === null ) {
[119] Fix | Delete
[120] Fix | Delete
// check the fragment identifier in the URL
[121] Fix | Delete
if ( locationHash ) {
[122] Fix | Delete
this.tabs.each( function( i, tab ) {
[123] Fix | Delete
if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
[124] Fix | Delete
active = i;
[125] Fix | Delete
return false;
[126] Fix | Delete
}
[127] Fix | Delete
} );
[128] Fix | Delete
}
[129] Fix | Delete
[130] Fix | Delete
// Check for a tab marked active via a class
[131] Fix | Delete
if ( active === null ) {
[132] Fix | Delete
active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
[133] Fix | Delete
}
[134] Fix | Delete
[135] Fix | Delete
// No active tab, set to false
[136] Fix | Delete
if ( active === null || active === -1 ) {
[137] Fix | Delete
active = this.tabs.length ? 0 : false;
[138] Fix | Delete
}
[139] Fix | Delete
}
[140] Fix | Delete
[141] Fix | Delete
// Handle numbers: negative, out of range
[142] Fix | Delete
if ( active !== false ) {
[143] Fix | Delete
active = this.tabs.index( this.tabs.eq( active ) );
[144] Fix | Delete
if ( active === -1 ) {
[145] Fix | Delete
active = collapsible ? false : 0;
[146] Fix | Delete
}
[147] Fix | Delete
}
[148] Fix | Delete
[149] Fix | Delete
// Don't allow collapsible: false and active: false
[150] Fix | Delete
if ( !collapsible && active === false && this.anchors.length ) {
[151] Fix | Delete
active = 0;
[152] Fix | Delete
}
[153] Fix | Delete
[154] Fix | Delete
return active;
[155] Fix | Delete
},
[156] Fix | Delete
[157] Fix | Delete
_getCreateEventData: function() {
[158] Fix | Delete
return {
[159] Fix | Delete
tab: this.active,
[160] Fix | Delete
panel: !this.active.length ? $() : this._getPanelForTab( this.active )
[161] Fix | Delete
};
[162] Fix | Delete
},
[163] Fix | Delete
[164] Fix | Delete
_tabKeydown: function( event ) {
[165] Fix | Delete
var focusedTab = $( $.ui.safeActiveElement( this.document[ 0 ] ) ).closest( "li" ),
[166] Fix | Delete
selectedIndex = this.tabs.index( focusedTab ),
[167] Fix | Delete
goingForward = true;
[168] Fix | Delete
[169] Fix | Delete
if ( this._handlePageNav( event ) ) {
[170] Fix | Delete
return;
[171] Fix | Delete
}
[172] Fix | Delete
[173] Fix | Delete
switch ( event.keyCode ) {
[174] Fix | Delete
case $.ui.keyCode.RIGHT:
[175] Fix | Delete
case $.ui.keyCode.DOWN:
[176] Fix | Delete
selectedIndex++;
[177] Fix | Delete
break;
[178] Fix | Delete
case $.ui.keyCode.UP:
[179] Fix | Delete
case $.ui.keyCode.LEFT:
[180] Fix | Delete
goingForward = false;
[181] Fix | Delete
selectedIndex--;
[182] Fix | Delete
break;
[183] Fix | Delete
case $.ui.keyCode.END:
[184] Fix | Delete
selectedIndex = this.anchors.length - 1;
[185] Fix | Delete
break;
[186] Fix | Delete
case $.ui.keyCode.HOME:
[187] Fix | Delete
selectedIndex = 0;
[188] Fix | Delete
break;
[189] Fix | Delete
case $.ui.keyCode.SPACE:
[190] Fix | Delete
[191] Fix | Delete
// Activate only, no collapsing
[192] Fix | Delete
event.preventDefault();
[193] Fix | Delete
clearTimeout( this.activating );
[194] Fix | Delete
this._activate( selectedIndex );
[195] Fix | Delete
return;
[196] Fix | Delete
case $.ui.keyCode.ENTER:
[197] Fix | Delete
[198] Fix | Delete
// Toggle (cancel delayed activation, allow collapsing)
[199] Fix | Delete
event.preventDefault();
[200] Fix | Delete
clearTimeout( this.activating );
[201] Fix | Delete
[202] Fix | Delete
// Determine if we should collapse or activate
[203] Fix | Delete
this._activate( selectedIndex === this.options.active ? false : selectedIndex );
[204] Fix | Delete
return;
[205] Fix | Delete
default:
[206] Fix | Delete
return;
[207] Fix | Delete
}
[208] Fix | Delete
[209] Fix | Delete
// Focus the appropriate tab, based on which key was pressed
[210] Fix | Delete
event.preventDefault();
[211] Fix | Delete
clearTimeout( this.activating );
[212] Fix | Delete
selectedIndex = this._focusNextTab( selectedIndex, goingForward );
[213] Fix | Delete
[214] Fix | Delete
// Navigating with control/command key will prevent automatic activation
[215] Fix | Delete
if ( !event.ctrlKey && !event.metaKey ) {
[216] Fix | Delete
[217] Fix | Delete
// Update aria-selected immediately so that AT think the tab is already selected.
[218] Fix | Delete
// Otherwise AT may confuse the user by stating that they need to activate the tab,
[219] Fix | Delete
// but the tab will already be activated by the time the announcement finishes.
[220] Fix | Delete
focusedTab.attr( "aria-selected", "false" );
[221] Fix | Delete
this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
[222] Fix | Delete
[223] Fix | Delete
this.activating = this._delay( function() {
[224] Fix | Delete
this.option( "active", selectedIndex );
[225] Fix | Delete
}, this.delay );
[226] Fix | Delete
}
[227] Fix | Delete
},
[228] Fix | Delete
[229] Fix | Delete
_panelKeydown: function( event ) {
[230] Fix | Delete
if ( this._handlePageNav( event ) ) {
[231] Fix | Delete
return;
[232] Fix | Delete
}
[233] Fix | Delete
[234] Fix | Delete
// Ctrl+up moves focus to the current tab
[235] Fix | Delete
if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
[236] Fix | Delete
event.preventDefault();
[237] Fix | Delete
this.active.trigger( "focus" );
[238] Fix | Delete
}
[239] Fix | Delete
},
[240] Fix | Delete
[241] Fix | Delete
// Alt+page up/down moves focus to the previous/next tab (and activates)
[242] Fix | Delete
_handlePageNav: function( event ) {
[243] Fix | Delete
if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
[244] Fix | Delete
this._activate( this._focusNextTab( this.options.active - 1, false ) );
[245] Fix | Delete
return true;
[246] Fix | Delete
}
[247] Fix | Delete
if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
[248] Fix | Delete
this._activate( this._focusNextTab( this.options.active + 1, true ) );
[249] Fix | Delete
return true;
[250] Fix | Delete
}
[251] Fix | Delete
},
[252] Fix | Delete
[253] Fix | Delete
_findNextTab: function( index, goingForward ) {
[254] Fix | Delete
var lastTabIndex = this.tabs.length - 1;
[255] Fix | Delete
[256] Fix | Delete
function constrain() {
[257] Fix | Delete
if ( index > lastTabIndex ) {
[258] Fix | Delete
index = 0;
[259] Fix | Delete
}
[260] Fix | Delete
if ( index < 0 ) {
[261] Fix | Delete
index = lastTabIndex;
[262] Fix | Delete
}
[263] Fix | Delete
return index;
[264] Fix | Delete
}
[265] Fix | Delete
[266] Fix | Delete
while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
[267] Fix | Delete
index = goingForward ? index + 1 : index - 1;
[268] Fix | Delete
}
[269] Fix | Delete
[270] Fix | Delete
return index;
[271] Fix | Delete
},
[272] Fix | Delete
[273] Fix | Delete
_focusNextTab: function( index, goingForward ) {
[274] Fix | Delete
index = this._findNextTab( index, goingForward );
[275] Fix | Delete
this.tabs.eq( index ).trigger( "focus" );
[276] Fix | Delete
return index;
[277] Fix | Delete
},
[278] Fix | Delete
[279] Fix | Delete
_setOption: function( key, value ) {
[280] Fix | Delete
if ( key === "active" ) {
[281] Fix | Delete
[282] Fix | Delete
// _activate() will handle invalid values and update this.options
[283] Fix | Delete
this._activate( value );
[284] Fix | Delete
return;
[285] Fix | Delete
}
[286] Fix | Delete
[287] Fix | Delete
this._super( key, value );
[288] Fix | Delete
[289] Fix | Delete
if ( key === "collapsible" ) {
[290] Fix | Delete
this._toggleClass( "ui-tabs-collapsible", null, value );
[291] Fix | Delete
[292] Fix | Delete
// Setting collapsible: false while collapsed; open first panel
[293] Fix | Delete
if ( !value && this.options.active === false ) {
[294] Fix | Delete
this._activate( 0 );
[295] Fix | Delete
}
[296] Fix | Delete
}
[297] Fix | Delete
[298] Fix | Delete
if ( key === "event" ) {
[299] Fix | Delete
this._setupEvents( value );
[300] Fix | Delete
}
[301] Fix | Delete
[302] Fix | Delete
if ( key === "heightStyle" ) {
[303] Fix | Delete
this._setupHeightStyle( value );
[304] Fix | Delete
}
[305] Fix | Delete
},
[306] Fix | Delete
[307] Fix | Delete
_sanitizeSelector: function( hash ) {
[308] Fix | Delete
return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
[309] Fix | Delete
},
[310] Fix | Delete
[311] Fix | Delete
refresh: function() {
[312] Fix | Delete
var options = this.options,
[313] Fix | Delete
lis = this.tablist.children( ":has(a[href])" );
[314] Fix | Delete
[315] Fix | Delete
// Get disabled tabs from class attribute from HTML
[316] Fix | Delete
// this will get converted to a boolean if needed in _refresh()
[317] Fix | Delete
options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
[318] Fix | Delete
return lis.index( tab );
[319] Fix | Delete
} );
[320] Fix | Delete
[321] Fix | Delete
this._processTabs();
[322] Fix | Delete
[323] Fix | Delete
// Was collapsed or no tabs
[324] Fix | Delete
if ( options.active === false || !this.anchors.length ) {
[325] Fix | Delete
options.active = false;
[326] Fix | Delete
this.active = $();
[327] Fix | Delete
[328] Fix | Delete
// was active, but active tab is gone
[329] Fix | Delete
} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
[330] Fix | Delete
[331] Fix | Delete
// all remaining tabs are disabled
[332] Fix | Delete
if ( this.tabs.length === options.disabled.length ) {
[333] Fix | Delete
options.active = false;
[334] Fix | Delete
this.active = $();
[335] Fix | Delete
[336] Fix | Delete
// activate previous tab
[337] Fix | Delete
} else {
[338] Fix | Delete
this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
[339] Fix | Delete
}
[340] Fix | Delete
[341] Fix | Delete
// was active, active tab still exists
[342] Fix | Delete
} else {
[343] Fix | Delete
[344] Fix | Delete
// make sure active index is correct
[345] Fix | Delete
options.active = this.tabs.index( this.active );
[346] Fix | Delete
}
[347] Fix | Delete
[348] Fix | Delete
this._refresh();
[349] Fix | Delete
},
[350] Fix | Delete
[351] Fix | Delete
_refresh: function() {
[352] Fix | Delete
this._setOptionDisabled( this.options.disabled );
[353] Fix | Delete
this._setupEvents( this.options.event );
[354] Fix | Delete
this._setupHeightStyle( this.options.heightStyle );
[355] Fix | Delete
[356] Fix | Delete
this.tabs.not( this.active ).attr( {
[357] Fix | Delete
"aria-selected": "false",
[358] Fix | Delete
"aria-expanded": "false",
[359] Fix | Delete
tabIndex: -1
[360] Fix | Delete
} );
[361] Fix | Delete
this.panels.not( this._getPanelForTab( this.active ) )
[362] Fix | Delete
.hide()
[363] Fix | Delete
.attr( {
[364] Fix | Delete
"aria-hidden": "true"
[365] Fix | Delete
} );
[366] Fix | Delete
[367] Fix | Delete
// Make sure one tab is in the tab order
[368] Fix | Delete
if ( !this.active.length ) {
[369] Fix | Delete
this.tabs.eq( 0 ).attr( "tabIndex", 0 );
[370] Fix | Delete
} else {
[371] Fix | Delete
this.active
[372] Fix | Delete
.attr( {
[373] Fix | Delete
"aria-selected": "true",
[374] Fix | Delete
"aria-expanded": "true",
[375] Fix | Delete
tabIndex: 0
[376] Fix | Delete
} );
[377] Fix | Delete
this._addClass( this.active, "ui-tabs-active", "ui-state-active" );
[378] Fix | Delete
this._getPanelForTab( this.active )
[379] Fix | Delete
.show()
[380] Fix | Delete
.attr( {
[381] Fix | Delete
"aria-hidden": "false"
[382] Fix | Delete
} );
[383] Fix | Delete
}
[384] Fix | Delete
},
[385] Fix | Delete
[386] Fix | Delete
_processTabs: function() {
[387] Fix | Delete
var that = this,
[388] Fix | Delete
prevTabs = this.tabs,
[389] Fix | Delete
prevAnchors = this.anchors,
[390] Fix | Delete
prevPanels = this.panels;
[391] Fix | Delete
[392] Fix | Delete
this.tablist = this._getList().attr( "role", "tablist" );
[393] Fix | Delete
this._addClass( this.tablist, "ui-tabs-nav",
[394] Fix | Delete
"ui-helper-reset ui-helper-clearfix ui-widget-header" );
[395] Fix | Delete
[396] Fix | Delete
// Prevent users from focusing disabled tabs via click
[397] Fix | Delete
this.tablist
[398] Fix | Delete
.on( "mousedown" + this.eventNamespace, "> li", function( event ) {
[399] Fix | Delete
if ( $( this ).is( ".ui-state-disabled" ) ) {
[400] Fix | Delete
event.preventDefault();
[401] Fix | Delete
}
[402] Fix | Delete
} )
[403] Fix | Delete
[404] Fix | Delete
// Support: IE <9
[405] Fix | Delete
// Preventing the default action in mousedown doesn't prevent IE
[406] Fix | Delete
// from focusing the element, so if the anchor gets focused, blur.
[407] Fix | Delete
// We don't have to worry about focusing the previously focused
[408] Fix | Delete
// element since clicking on a non-focusable element should focus
[409] Fix | Delete
// the body anyway.
[410] Fix | Delete
.on( "focus" + this.eventNamespace, ".ui-tabs-anchor", function() {
[411] Fix | Delete
if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
[412] Fix | Delete
this.blur();
[413] Fix | Delete
}
[414] Fix | Delete
} );
[415] Fix | Delete
[416] Fix | Delete
this.tabs = this.tablist.find( "> li:has(a[href])" )
[417] Fix | Delete
.attr( {
[418] Fix | Delete
role: "tab",
[419] Fix | Delete
tabIndex: -1
[420] Fix | Delete
} );
[421] Fix | Delete
this._addClass( this.tabs, "ui-tabs-tab", "ui-state-default" );
[422] Fix | Delete
[423] Fix | Delete
this.anchors = this.tabs.map( function() {
[424] Fix | Delete
return $( "a", this )[ 0 ];
[425] Fix | Delete
} )
[426] Fix | Delete
.attr( {
[427] Fix | Delete
role: "presentation",
[428] Fix | Delete
tabIndex: -1
[429] Fix | Delete
} );
[430] Fix | Delete
this._addClass( this.anchors, "ui-tabs-anchor" );
[431] Fix | Delete
[432] Fix | Delete
this.panels = $();
[433] Fix | Delete
[434] Fix | Delete
this.anchors.each( function( i, anchor ) {
[435] Fix | Delete
var selector, panel, panelId,
[436] Fix | Delete
anchorId = $( anchor ).uniqueId().attr( "id" ),
[437] Fix | Delete
tab = $( anchor ).closest( "li" ),
[438] Fix | Delete
originalAriaControls = tab.attr( "aria-controls" );
[439] Fix | Delete
[440] Fix | Delete
// Inline tab
[441] Fix | Delete
if ( that._isLocal( anchor ) ) {
[442] Fix | Delete
selector = anchor.hash;
[443] Fix | Delete
panelId = selector.substring( 1 );
[444] Fix | Delete
panel = that.element.find( that._sanitizeSelector( selector ) );
[445] Fix | Delete
[446] Fix | Delete
// remote tab
[447] Fix | Delete
} else {
[448] Fix | Delete
[449] Fix | Delete
// If the tab doesn't already have aria-controls,
[450] Fix | Delete
// generate an id by using a throw-away element
[451] Fix | Delete
panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id;
[452] Fix | Delete
selector = "#" + panelId;
[453] Fix | Delete
panel = that.element.find( selector );
[454] Fix | Delete
if ( !panel.length ) {
[455] Fix | Delete
panel = that._createPanel( panelId );
[456] Fix | Delete
panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
[457] Fix | Delete
}
[458] Fix | Delete
panel.attr( "aria-live", "polite" );
[459] Fix | Delete
}
[460] Fix | Delete
[461] Fix | Delete
if ( panel.length ) {
[462] Fix | Delete
that.panels = that.panels.add( panel );
[463] Fix | Delete
}
[464] Fix | Delete
if ( originalAriaControls ) {
[465] Fix | Delete
tab.data( "ui-tabs-aria-controls", originalAriaControls );
[466] Fix | Delete
}
[467] Fix | Delete
tab.attr( {
[468] Fix | Delete
"aria-controls": panelId,
[469] Fix | Delete
"aria-labelledby": anchorId
[470] Fix | Delete
} );
[471] Fix | Delete
panel.attr( "aria-labelledby", anchorId );
[472] Fix | Delete
} );
[473] Fix | Delete
[474] Fix | Delete
this.panels.attr( "role", "tabpanel" );
[475] Fix | Delete
this._addClass( this.panels, "ui-tabs-panel", "ui-widget-content" );
[476] Fix | Delete
[477] Fix | Delete
// Avoid memory leaks (#10056)
[478] Fix | Delete
if ( prevTabs ) {
[479] Fix | Delete
this._off( prevTabs.not( this.tabs ) );
[480] Fix | Delete
this._off( prevAnchors.not( this.anchors ) );
[481] Fix | Delete
this._off( prevPanels.not( this.panels ) );
[482] Fix | Delete
}
[483] Fix | Delete
},
[484] Fix | Delete
[485] Fix | Delete
// Allow overriding how to find the list for rare usage scenarios (#7715)
[486] Fix | Delete
_getList: function() {
[487] Fix | Delete
return this.tablist || this.element.find( "ol, ul" ).eq( 0 );
[488] Fix | Delete
},
[489] Fix | Delete
[490] Fix | Delete
_createPanel: function( id ) {
[491] Fix | Delete
return $( "<div>" )
[492] Fix | Delete
.attr( "id", id )
[493] Fix | Delete
.data( "ui-tabs-destroy", true );
[494] Fix | Delete
},
[495] Fix | Delete
[496] Fix | Delete
_setOptionDisabled: function( disabled ) {
[497] Fix | Delete
var currentItem, li, i;
[498] Fix | Delete
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function