Edit File by line
/home/barbar84/public_h.../wp-inclu.../js/jquery/ui
File: tooltip.js
/*!
[0] Fix | Delete
* jQuery UI Tooltip 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: Tooltip
[9] Fix | Delete
//>>group: Widgets
[10] Fix | Delete
//>>description: Shows additional information for any element on hover or focus.
[11] Fix | Delete
//>>docs: http://api.jqueryui.com/tooltip/
[12] Fix | Delete
//>>demos: http://jqueryui.com/tooltip/
[13] Fix | Delete
//>>css.structure: ../../themes/base/core.css
[14] Fix | Delete
//>>css.structure: ../../themes/base/tooltip.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.tooltip", {
[33] Fix | Delete
version: "1.12.1",
[34] Fix | Delete
options: {
[35] Fix | Delete
classes: {
[36] Fix | Delete
"ui-tooltip": "ui-corner-all ui-widget-shadow"
[37] Fix | Delete
},
[38] Fix | Delete
content: function() {
[39] Fix | Delete
[40] Fix | Delete
// support: IE<9, Opera in jQuery <1.7
[41] Fix | Delete
// .text() can't accept undefined, so coerce to a string
[42] Fix | Delete
var title = $( this ).attr( "title" ) || "";
[43] Fix | Delete
[44] Fix | Delete
// Escape title, since we're going from an attribute to raw HTML
[45] Fix | Delete
return $( "<a>" ).text( title ).html();
[46] Fix | Delete
},
[47] Fix | Delete
hide: true,
[48] Fix | Delete
[49] Fix | Delete
// Disabled elements have inconsistent behavior across browsers (#8661)
[50] Fix | Delete
items: "[title]:not([disabled])",
[51] Fix | Delete
position: {
[52] Fix | Delete
my: "left top+15",
[53] Fix | Delete
at: "left bottom",
[54] Fix | Delete
collision: "flipfit flip"
[55] Fix | Delete
},
[56] Fix | Delete
show: true,
[57] Fix | Delete
track: false,
[58] Fix | Delete
[59] Fix | Delete
// Callbacks
[60] Fix | Delete
close: null,
[61] Fix | Delete
open: null
[62] Fix | Delete
},
[63] Fix | Delete
[64] Fix | Delete
_addDescribedBy: function( elem, id ) {
[65] Fix | Delete
var describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ );
[66] Fix | Delete
describedby.push( id );
[67] Fix | Delete
elem
[68] Fix | Delete
.data( "ui-tooltip-id", id )
[69] Fix | Delete
.attr( "aria-describedby", $.trim( describedby.join( " " ) ) );
[70] Fix | Delete
},
[71] Fix | Delete
[72] Fix | Delete
_removeDescribedBy: function( elem ) {
[73] Fix | Delete
var id = elem.data( "ui-tooltip-id" ),
[74] Fix | Delete
describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ ),
[75] Fix | Delete
index = $.inArray( id, describedby );
[76] Fix | Delete
[77] Fix | Delete
if ( index !== -1 ) {
[78] Fix | Delete
describedby.splice( index, 1 );
[79] Fix | Delete
}
[80] Fix | Delete
[81] Fix | Delete
elem.removeData( "ui-tooltip-id" );
[82] Fix | Delete
describedby = $.trim( describedby.join( " " ) );
[83] Fix | Delete
if ( describedby ) {
[84] Fix | Delete
elem.attr( "aria-describedby", describedby );
[85] Fix | Delete
} else {
[86] Fix | Delete
elem.removeAttr( "aria-describedby" );
[87] Fix | Delete
}
[88] Fix | Delete
},
[89] Fix | Delete
[90] Fix | Delete
_create: function() {
[91] Fix | Delete
this._on( {
[92] Fix | Delete
mouseover: "open",
[93] Fix | Delete
focusin: "open"
[94] Fix | Delete
} );
[95] Fix | Delete
[96] Fix | Delete
// IDs of generated tooltips, needed for destroy
[97] Fix | Delete
this.tooltips = {};
[98] Fix | Delete
[99] Fix | Delete
// IDs of parent tooltips where we removed the title attribute
[100] Fix | Delete
this.parents = {};
[101] Fix | Delete
[102] Fix | Delete
// Append the aria-live region so tooltips announce correctly
[103] Fix | Delete
this.liveRegion = $( "<div>" )
[104] Fix | Delete
.attr( {
[105] Fix | Delete
role: "log",
[106] Fix | Delete
"aria-live": "assertive",
[107] Fix | Delete
"aria-relevant": "additions"
[108] Fix | Delete
} )
[109] Fix | Delete
.appendTo( this.document[ 0 ].body );
[110] Fix | Delete
this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
[111] Fix | Delete
[112] Fix | Delete
this.disabledTitles = $( [] );
[113] Fix | Delete
},
[114] Fix | Delete
[115] Fix | Delete
_setOption: function( key, value ) {
[116] Fix | Delete
var that = this;
[117] Fix | Delete
[118] Fix | Delete
this._super( key, value );
[119] Fix | Delete
[120] Fix | Delete
if ( key === "content" ) {
[121] Fix | Delete
$.each( this.tooltips, function( id, tooltipData ) {
[122] Fix | Delete
that._updateContent( tooltipData.element );
[123] Fix | Delete
} );
[124] Fix | Delete
}
[125] Fix | Delete
},
[126] Fix | Delete
[127] Fix | Delete
_setOptionDisabled: function( value ) {
[128] Fix | Delete
this[ value ? "_disable" : "_enable" ]();
[129] Fix | Delete
},
[130] Fix | Delete
[131] Fix | Delete
_disable: function() {
[132] Fix | Delete
var that = this;
[133] Fix | Delete
[134] Fix | Delete
// Close open tooltips
[135] Fix | Delete
$.each( this.tooltips, function( id, tooltipData ) {
[136] Fix | Delete
var event = $.Event( "blur" );
[137] Fix | Delete
event.target = event.currentTarget = tooltipData.element[ 0 ];
[138] Fix | Delete
that.close( event, true );
[139] Fix | Delete
} );
[140] Fix | Delete
[141] Fix | Delete
// Remove title attributes to prevent native tooltips
[142] Fix | Delete
this.disabledTitles = this.disabledTitles.add(
[143] Fix | Delete
this.element.find( this.options.items ).addBack()
[144] Fix | Delete
.filter( function() {
[145] Fix | Delete
var element = $( this );
[146] Fix | Delete
if ( element.is( "[title]" ) ) {
[147] Fix | Delete
return element
[148] Fix | Delete
.data( "ui-tooltip-title", element.attr( "title" ) )
[149] Fix | Delete
.removeAttr( "title" );
[150] Fix | Delete
}
[151] Fix | Delete
} )
[152] Fix | Delete
);
[153] Fix | Delete
},
[154] Fix | Delete
[155] Fix | Delete
_enable: function() {
[156] Fix | Delete
[157] Fix | Delete
// restore title attributes
[158] Fix | Delete
this.disabledTitles.each( function() {
[159] Fix | Delete
var element = $( this );
[160] Fix | Delete
if ( element.data( "ui-tooltip-title" ) ) {
[161] Fix | Delete
element.attr( "title", element.data( "ui-tooltip-title" ) );
[162] Fix | Delete
}
[163] Fix | Delete
} );
[164] Fix | Delete
this.disabledTitles = $( [] );
[165] Fix | Delete
},
[166] Fix | Delete
[167] Fix | Delete
open: function( event ) {
[168] Fix | Delete
var that = this,
[169] Fix | Delete
target = $( event ? event.target : this.element )
[170] Fix | Delete
[171] Fix | Delete
// we need closest here due to mouseover bubbling,
[172] Fix | Delete
// but always pointing at the same event target
[173] Fix | Delete
.closest( this.options.items );
[174] Fix | Delete
[175] Fix | Delete
// No element to show a tooltip for or the tooltip is already open
[176] Fix | Delete
if ( !target.length || target.data( "ui-tooltip-id" ) ) {
[177] Fix | Delete
return;
[178] Fix | Delete
}
[179] Fix | Delete
[180] Fix | Delete
if ( target.attr( "title" ) ) {
[181] Fix | Delete
target.data( "ui-tooltip-title", target.attr( "title" ) );
[182] Fix | Delete
}
[183] Fix | Delete
[184] Fix | Delete
target.data( "ui-tooltip-open", true );
[185] Fix | Delete
[186] Fix | Delete
// Kill parent tooltips, custom or native, for hover
[187] Fix | Delete
if ( event && event.type === "mouseover" ) {
[188] Fix | Delete
target.parents().each( function() {
[189] Fix | Delete
var parent = $( this ),
[190] Fix | Delete
blurEvent;
[191] Fix | Delete
if ( parent.data( "ui-tooltip-open" ) ) {
[192] Fix | Delete
blurEvent = $.Event( "blur" );
[193] Fix | Delete
blurEvent.target = blurEvent.currentTarget = this;
[194] Fix | Delete
that.close( blurEvent, true );
[195] Fix | Delete
}
[196] Fix | Delete
if ( parent.attr( "title" ) ) {
[197] Fix | Delete
parent.uniqueId();
[198] Fix | Delete
that.parents[ this.id ] = {
[199] Fix | Delete
element: this,
[200] Fix | Delete
title: parent.attr( "title" )
[201] Fix | Delete
};
[202] Fix | Delete
parent.attr( "title", "" );
[203] Fix | Delete
}
[204] Fix | Delete
} );
[205] Fix | Delete
}
[206] Fix | Delete
[207] Fix | Delete
this._registerCloseHandlers( event, target );
[208] Fix | Delete
this._updateContent( target, event );
[209] Fix | Delete
},
[210] Fix | Delete
[211] Fix | Delete
_updateContent: function( target, event ) {
[212] Fix | Delete
var content,
[213] Fix | Delete
contentOption = this.options.content,
[214] Fix | Delete
that = this,
[215] Fix | Delete
eventType = event ? event.type : null;
[216] Fix | Delete
[217] Fix | Delete
if ( typeof contentOption === "string" || contentOption.nodeType ||
[218] Fix | Delete
contentOption.jquery ) {
[219] Fix | Delete
return this._open( event, target, contentOption );
[220] Fix | Delete
}
[221] Fix | Delete
[222] Fix | Delete
content = contentOption.call( target[ 0 ], function( response ) {
[223] Fix | Delete
[224] Fix | Delete
// IE may instantly serve a cached response for ajax requests
[225] Fix | Delete
// delay this call to _open so the other call to _open runs first
[226] Fix | Delete
that._delay( function() {
[227] Fix | Delete
[228] Fix | Delete
// Ignore async response if tooltip was closed already
[229] Fix | Delete
if ( !target.data( "ui-tooltip-open" ) ) {
[230] Fix | Delete
return;
[231] Fix | Delete
}
[232] Fix | Delete
[233] Fix | Delete
// JQuery creates a special event for focusin when it doesn't
[234] Fix | Delete
// exist natively. To improve performance, the native event
[235] Fix | Delete
// object is reused and the type is changed. Therefore, we can't
[236] Fix | Delete
// rely on the type being correct after the event finished
[237] Fix | Delete
// bubbling, so we set it back to the previous value. (#8740)
[238] Fix | Delete
if ( event ) {
[239] Fix | Delete
event.type = eventType;
[240] Fix | Delete
}
[241] Fix | Delete
this._open( event, target, response );
[242] Fix | Delete
} );
[243] Fix | Delete
} );
[244] Fix | Delete
if ( content ) {
[245] Fix | Delete
this._open( event, target, content );
[246] Fix | Delete
}
[247] Fix | Delete
},
[248] Fix | Delete
[249] Fix | Delete
_open: function( event, target, content ) {
[250] Fix | Delete
var tooltipData, tooltip, delayedShow, a11yContent,
[251] Fix | Delete
positionOption = $.extend( {}, this.options.position );
[252] Fix | Delete
[253] Fix | Delete
if ( !content ) {
[254] Fix | Delete
return;
[255] Fix | Delete
}
[256] Fix | Delete
[257] Fix | Delete
// Content can be updated multiple times. If the tooltip already
[258] Fix | Delete
// exists, then just update the content and bail.
[259] Fix | Delete
tooltipData = this._find( target );
[260] Fix | Delete
if ( tooltipData ) {
[261] Fix | Delete
tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content );
[262] Fix | Delete
return;
[263] Fix | Delete
}
[264] Fix | Delete
[265] Fix | Delete
// If we have a title, clear it to prevent the native tooltip
[266] Fix | Delete
// we have to check first to avoid defining a title if none exists
[267] Fix | Delete
// (we don't want to cause an element to start matching [title])
[268] Fix | Delete
//
[269] Fix | Delete
// We use removeAttr only for key events, to allow IE to export the correct
[270] Fix | Delete
// accessible attributes. For mouse events, set to empty string to avoid
[271] Fix | Delete
// native tooltip showing up (happens only when removing inside mouseover).
[272] Fix | Delete
if ( target.is( "[title]" ) ) {
[273] Fix | Delete
if ( event && event.type === "mouseover" ) {
[274] Fix | Delete
target.attr( "title", "" );
[275] Fix | Delete
} else {
[276] Fix | Delete
target.removeAttr( "title" );
[277] Fix | Delete
}
[278] Fix | Delete
}
[279] Fix | Delete
[280] Fix | Delete
tooltipData = this._tooltip( target );
[281] Fix | Delete
tooltip = tooltipData.tooltip;
[282] Fix | Delete
this._addDescribedBy( target, tooltip.attr( "id" ) );
[283] Fix | Delete
tooltip.find( ".ui-tooltip-content" ).html( content );
[284] Fix | Delete
[285] Fix | Delete
// Support: Voiceover on OS X, JAWS on IE <= 9
[286] Fix | Delete
// JAWS announces deletions even when aria-relevant="additions"
[287] Fix | Delete
// Voiceover will sometimes re-read the entire log region's contents from the beginning
[288] Fix | Delete
this.liveRegion.children().hide();
[289] Fix | Delete
a11yContent = $( "<div>" ).html( tooltip.find( ".ui-tooltip-content" ).html() );
[290] Fix | Delete
a11yContent.removeAttr( "name" ).find( "[name]" ).removeAttr( "name" );
[291] Fix | Delete
a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" );
[292] Fix | Delete
a11yContent.appendTo( this.liveRegion );
[293] Fix | Delete
[294] Fix | Delete
function position( event ) {
[295] Fix | Delete
positionOption.of = event;
[296] Fix | Delete
if ( tooltip.is( ":hidden" ) ) {
[297] Fix | Delete
return;
[298] Fix | Delete
}
[299] Fix | Delete
tooltip.position( positionOption );
[300] Fix | Delete
}
[301] Fix | Delete
if ( this.options.track && event && /^mouse/.test( event.type ) ) {
[302] Fix | Delete
this._on( this.document, {
[303] Fix | Delete
mousemove: position
[304] Fix | Delete
} );
[305] Fix | Delete
[306] Fix | Delete
// trigger once to override element-relative positioning
[307] Fix | Delete
position( event );
[308] Fix | Delete
} else {
[309] Fix | Delete
tooltip.position( $.extend( {
[310] Fix | Delete
of: target
[311] Fix | Delete
}, this.options.position ) );
[312] Fix | Delete
}
[313] Fix | Delete
[314] Fix | Delete
tooltip.hide();
[315] Fix | Delete
[316] Fix | Delete
this._show( tooltip, this.options.show );
[317] Fix | Delete
[318] Fix | Delete
// Handle tracking tooltips that are shown with a delay (#8644). As soon
[319] Fix | Delete
// as the tooltip is visible, position the tooltip using the most recent
[320] Fix | Delete
// event.
[321] Fix | Delete
// Adds the check to add the timers only when both delay and track options are set (#14682)
[322] Fix | Delete
if ( this.options.track && this.options.show && this.options.show.delay ) {
[323] Fix | Delete
delayedShow = this.delayedShow = setInterval( function() {
[324] Fix | Delete
if ( tooltip.is( ":visible" ) ) {
[325] Fix | Delete
position( positionOption.of );
[326] Fix | Delete
clearInterval( delayedShow );
[327] Fix | Delete
}
[328] Fix | Delete
}, $.fx.interval );
[329] Fix | Delete
}
[330] Fix | Delete
[331] Fix | Delete
this._trigger( "open", event, { tooltip: tooltip } );
[332] Fix | Delete
},
[333] Fix | Delete
[334] Fix | Delete
_registerCloseHandlers: function( event, target ) {
[335] Fix | Delete
var events = {
[336] Fix | Delete
keyup: function( event ) {
[337] Fix | Delete
if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
[338] Fix | Delete
var fakeEvent = $.Event( event );
[339] Fix | Delete
fakeEvent.currentTarget = target[ 0 ];
[340] Fix | Delete
this.close( fakeEvent, true );
[341] Fix | Delete
}
[342] Fix | Delete
}
[343] Fix | Delete
};
[344] Fix | Delete
[345] Fix | Delete
// Only bind remove handler for delegated targets. Non-delegated
[346] Fix | Delete
// tooltips will handle this in destroy.
[347] Fix | Delete
if ( target[ 0 ] !== this.element[ 0 ] ) {
[348] Fix | Delete
events.remove = function() {
[349] Fix | Delete
this._removeTooltip( this._find( target ).tooltip );
[350] Fix | Delete
};
[351] Fix | Delete
}
[352] Fix | Delete
[353] Fix | Delete
if ( !event || event.type === "mouseover" ) {
[354] Fix | Delete
events.mouseleave = "close";
[355] Fix | Delete
}
[356] Fix | Delete
if ( !event || event.type === "focusin" ) {
[357] Fix | Delete
events.focusout = "close";
[358] Fix | Delete
}
[359] Fix | Delete
this._on( true, target, events );
[360] Fix | Delete
},
[361] Fix | Delete
[362] Fix | Delete
close: function( event ) {
[363] Fix | Delete
var tooltip,
[364] Fix | Delete
that = this,
[365] Fix | Delete
target = $( event ? event.currentTarget : this.element ),
[366] Fix | Delete
tooltipData = this._find( target );
[367] Fix | Delete
[368] Fix | Delete
// The tooltip may already be closed
[369] Fix | Delete
if ( !tooltipData ) {
[370] Fix | Delete
[371] Fix | Delete
// We set ui-tooltip-open immediately upon open (in open()), but only set the
[372] Fix | Delete
// additional data once there's actually content to show (in _open()). So even if the
[373] Fix | Delete
// tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in
[374] Fix | Delete
// the period between open() and _open().
[375] Fix | Delete
target.removeData( "ui-tooltip-open" );
[376] Fix | Delete
return;
[377] Fix | Delete
}
[378] Fix | Delete
[379] Fix | Delete
tooltip = tooltipData.tooltip;
[380] Fix | Delete
[381] Fix | Delete
// Disabling closes the tooltip, so we need to track when we're closing
[382] Fix | Delete
// to avoid an infinite loop in case the tooltip becomes disabled on close
[383] Fix | Delete
if ( tooltipData.closing ) {
[384] Fix | Delete
return;
[385] Fix | Delete
}
[386] Fix | Delete
[387] Fix | Delete
// Clear the interval for delayed tracking tooltips
[388] Fix | Delete
clearInterval( this.delayedShow );
[389] Fix | Delete
[390] Fix | Delete
// Only set title if we had one before (see comment in _open())
[391] Fix | Delete
// If the title attribute has changed since open(), don't restore
[392] Fix | Delete
if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) {
[393] Fix | Delete
target.attr( "title", target.data( "ui-tooltip-title" ) );
[394] Fix | Delete
}
[395] Fix | Delete
[396] Fix | Delete
this._removeDescribedBy( target );
[397] Fix | Delete
[398] Fix | Delete
tooltipData.hiding = true;
[399] Fix | Delete
tooltip.stop( true );
[400] Fix | Delete
this._hide( tooltip, this.options.hide, function() {
[401] Fix | Delete
that._removeTooltip( $( this ) );
[402] Fix | Delete
} );
[403] Fix | Delete
[404] Fix | Delete
target.removeData( "ui-tooltip-open" );
[405] Fix | Delete
this._off( target, "mouseleave focusout keyup" );
[406] Fix | Delete
[407] Fix | Delete
// Remove 'remove' binding only on delegated targets
[408] Fix | Delete
if ( target[ 0 ] !== this.element[ 0 ] ) {
[409] Fix | Delete
this._off( target, "remove" );
[410] Fix | Delete
}
[411] Fix | Delete
this._off( this.document, "mousemove" );
[412] Fix | Delete
[413] Fix | Delete
if ( event && event.type === "mouseleave" ) {
[414] Fix | Delete
$.each( this.parents, function( id, parent ) {
[415] Fix | Delete
$( parent.element ).attr( "title", parent.title );
[416] Fix | Delete
delete that.parents[ id ];
[417] Fix | Delete
} );
[418] Fix | Delete
}
[419] Fix | Delete
[420] Fix | Delete
tooltipData.closing = true;
[421] Fix | Delete
this._trigger( "close", event, { tooltip: tooltip } );
[422] Fix | Delete
if ( !tooltipData.hiding ) {
[423] Fix | Delete
tooltipData.closing = false;
[424] Fix | Delete
}
[425] Fix | Delete
},
[426] Fix | Delete
[427] Fix | Delete
_tooltip: function( element ) {
[428] Fix | Delete
var tooltip = $( "<div>" ).attr( "role", "tooltip" ),
[429] Fix | Delete
content = $( "<div>" ).appendTo( tooltip ),
[430] Fix | Delete
id = tooltip.uniqueId().attr( "id" );
[431] Fix | Delete
[432] Fix | Delete
this._addClass( content, "ui-tooltip-content" );
[433] Fix | Delete
this._addClass( tooltip, "ui-tooltip", "ui-widget ui-widget-content" );
[434] Fix | Delete
[435] Fix | Delete
tooltip.appendTo( this._appendTo( element ) );
[436] Fix | Delete
[437] Fix | Delete
return this.tooltips[ id ] = {
[438] Fix | Delete
element: element,
[439] Fix | Delete
tooltip: tooltip
[440] Fix | Delete
};
[441] Fix | Delete
},
[442] Fix | Delete
[443] Fix | Delete
_find: function( target ) {
[444] Fix | Delete
var id = target.data( "ui-tooltip-id" );
[445] Fix | Delete
return id ? this.tooltips[ id ] : null;
[446] Fix | Delete
},
[447] Fix | Delete
[448] Fix | Delete
_removeTooltip: function( tooltip ) {
[449] Fix | Delete
tooltip.remove();
[450] Fix | Delete
delete this.tooltips[ tooltip.attr( "id" ) ];
[451] Fix | Delete
},
[452] Fix | Delete
[453] Fix | Delete
_appendTo: function( target ) {
[454] Fix | Delete
var element = target.closest( ".ui-front, dialog" );
[455] Fix | Delete
[456] Fix | Delete
if ( !element.length ) {
[457] Fix | Delete
element = this.document[ 0 ].body;
[458] Fix | Delete
}
[459] Fix | Delete
[460] Fix | Delete
return element;
[461] Fix | Delete
},
[462] Fix | Delete
[463] Fix | Delete
_destroy: function() {
[464] Fix | Delete
var that = this;
[465] Fix | Delete
[466] Fix | Delete
// Close open tooltips
[467] Fix | Delete
$.each( this.tooltips, function( id, tooltipData ) {
[468] Fix | Delete
[469] Fix | Delete
// Delegate to close method to handle common cleanup
[470] Fix | Delete
var event = $.Event( "blur" ),
[471] Fix | Delete
element = tooltipData.element;
[472] Fix | Delete
event.target = event.currentTarget = element[ 0 ];
[473] Fix | Delete
that.close( event, true );
[474] Fix | Delete
[475] Fix | Delete
// Remove immediately; destroying an open tooltip doesn't use the
[476] Fix | Delete
// hide animation
[477] Fix | Delete
$( "#" + id ).remove();
[478] Fix | Delete
[479] Fix | Delete
// Restore the title
[480] Fix | Delete
if ( element.data( "ui-tooltip-title" ) ) {
[481] Fix | Delete
[482] Fix | Delete
// If the title attribute has changed since open(), don't restore
[483] Fix | Delete
if ( !element.attr( "title" ) ) {
[484] Fix | Delete
element.attr( "title", element.data( "ui-tooltip-title" ) );
[485] Fix | Delete
}
[486] Fix | Delete
element.removeData( "ui-tooltip-title" );
[487] Fix | Delete
}
[488] Fix | Delete
} );
[489] Fix | Delete
this.liveRegion.remove();
[490] Fix | Delete
}
[491] Fix | Delete
} );
[492] Fix | Delete
[493] Fix | Delete
// DEPRECATED
[494] Fix | Delete
// TODO: Switch return back to widget declaration at top of file when this is removed
[495] Fix | Delete
if ( $.uiBackCompat !== false ) {
[496] Fix | Delete
[497] Fix | Delete
// Backcompat for tooltipClass option
[498] Fix | Delete
$.widget( "ui.tooltip", $.ui.tooltip, {
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function