Edit File by line

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