Edit File by line
/home/barbar84/www/wp-inclu.../js/jquery
File: jquery.js
[5000] Fix | Delete
function buildFragment( elems, context, scripts, selection, ignored ) {
[5001] Fix | Delete
var elem, tmp, tag, wrap, attached, j,
[5002] Fix | Delete
fragment = context.createDocumentFragment(),
[5003] Fix | Delete
nodes = [],
[5004] Fix | Delete
i = 0,
[5005] Fix | Delete
l = elems.length;
[5006] Fix | Delete
[5007] Fix | Delete
for ( ; i < l; i++ ) {
[5008] Fix | Delete
elem = elems[ i ];
[5009] Fix | Delete
[5010] Fix | Delete
if ( elem || elem === 0 ) {
[5011] Fix | Delete
[5012] Fix | Delete
// Add nodes directly
[5013] Fix | Delete
if ( toType( elem ) === "object" ) {
[5014] Fix | Delete
[5015] Fix | Delete
// Support: Android <=4.0 only, PhantomJS 1 only
[5016] Fix | Delete
// push.apply(_, arraylike) throws on ancient WebKit
[5017] Fix | Delete
jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
[5018] Fix | Delete
[5019] Fix | Delete
// Convert non-html into a text node
[5020] Fix | Delete
} else if ( !rhtml.test( elem ) ) {
[5021] Fix | Delete
nodes.push( context.createTextNode( elem ) );
[5022] Fix | Delete
[5023] Fix | Delete
// Convert html into DOM nodes
[5024] Fix | Delete
} else {
[5025] Fix | Delete
tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
[5026] Fix | Delete
[5027] Fix | Delete
// Deserialize a standard representation
[5028] Fix | Delete
tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
[5029] Fix | Delete
wrap = wrapMap[ tag ] || wrapMap._default;
[5030] Fix | Delete
tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
[5031] Fix | Delete
[5032] Fix | Delete
// Descend through wrappers to the right content
[5033] Fix | Delete
j = wrap[ 0 ];
[5034] Fix | Delete
while ( j-- ) {
[5035] Fix | Delete
tmp = tmp.lastChild;
[5036] Fix | Delete
}
[5037] Fix | Delete
[5038] Fix | Delete
// Support: Android <=4.0 only, PhantomJS 1 only
[5039] Fix | Delete
// push.apply(_, arraylike) throws on ancient WebKit
[5040] Fix | Delete
jQuery.merge( nodes, tmp.childNodes );
[5041] Fix | Delete
[5042] Fix | Delete
// Remember the top-level container
[5043] Fix | Delete
tmp = fragment.firstChild;
[5044] Fix | Delete
[5045] Fix | Delete
// Ensure the created nodes are orphaned (#12392)
[5046] Fix | Delete
tmp.textContent = "";
[5047] Fix | Delete
}
[5048] Fix | Delete
}
[5049] Fix | Delete
}
[5050] Fix | Delete
[5051] Fix | Delete
// Remove wrapper from fragment
[5052] Fix | Delete
fragment.textContent = "";
[5053] Fix | Delete
[5054] Fix | Delete
i = 0;
[5055] Fix | Delete
while ( ( elem = nodes[ i++ ] ) ) {
[5056] Fix | Delete
[5057] Fix | Delete
// Skip elements already in the context collection (trac-4087)
[5058] Fix | Delete
if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
[5059] Fix | Delete
if ( ignored ) {
[5060] Fix | Delete
ignored.push( elem );
[5061] Fix | Delete
}
[5062] Fix | Delete
continue;
[5063] Fix | Delete
}
[5064] Fix | Delete
[5065] Fix | Delete
attached = isAttached( elem );
[5066] Fix | Delete
[5067] Fix | Delete
// Append to fragment
[5068] Fix | Delete
tmp = getAll( fragment.appendChild( elem ), "script" );
[5069] Fix | Delete
[5070] Fix | Delete
// Preserve script evaluation history
[5071] Fix | Delete
if ( attached ) {
[5072] Fix | Delete
setGlobalEval( tmp );
[5073] Fix | Delete
}
[5074] Fix | Delete
[5075] Fix | Delete
// Capture executables
[5076] Fix | Delete
if ( scripts ) {
[5077] Fix | Delete
j = 0;
[5078] Fix | Delete
while ( ( elem = tmp[ j++ ] ) ) {
[5079] Fix | Delete
if ( rscriptType.test( elem.type || "" ) ) {
[5080] Fix | Delete
scripts.push( elem );
[5081] Fix | Delete
}
[5082] Fix | Delete
}
[5083] Fix | Delete
}
[5084] Fix | Delete
}
[5085] Fix | Delete
[5086] Fix | Delete
return fragment;
[5087] Fix | Delete
}
[5088] Fix | Delete
[5089] Fix | Delete
[5090] Fix | Delete
var
[5091] Fix | Delete
rkeyEvent = /^key/,
[5092] Fix | Delete
rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
[5093] Fix | Delete
rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
[5094] Fix | Delete
[5095] Fix | Delete
function returnTrue() {
[5096] Fix | Delete
return true;
[5097] Fix | Delete
}
[5098] Fix | Delete
[5099] Fix | Delete
function returnFalse() {
[5100] Fix | Delete
return false;
[5101] Fix | Delete
}
[5102] Fix | Delete
[5103] Fix | Delete
// Support: IE <=9 - 11+
[5104] Fix | Delete
// focus() and blur() are asynchronous, except when they are no-op.
[5105] Fix | Delete
// So expect focus to be synchronous when the element is already active,
[5106] Fix | Delete
// and blur to be synchronous when the element is not already active.
[5107] Fix | Delete
// (focus and blur are always synchronous in other supported browsers,
[5108] Fix | Delete
// this just defines when we can count on it).
[5109] Fix | Delete
function expectSync( elem, type ) {
[5110] Fix | Delete
return ( elem === safeActiveElement() ) === ( type === "focus" );
[5111] Fix | Delete
}
[5112] Fix | Delete
[5113] Fix | Delete
// Support: IE <=9 only
[5114] Fix | Delete
// Accessing document.activeElement can throw unexpectedly
[5115] Fix | Delete
// https://bugs.jquery.com/ticket/13393
[5116] Fix | Delete
function safeActiveElement() {
[5117] Fix | Delete
try {
[5118] Fix | Delete
return document.activeElement;
[5119] Fix | Delete
} catch ( err ) { }
[5120] Fix | Delete
}
[5121] Fix | Delete
[5122] Fix | Delete
function on( elem, types, selector, data, fn, one ) {
[5123] Fix | Delete
var origFn, type;
[5124] Fix | Delete
[5125] Fix | Delete
// Types can be a map of types/handlers
[5126] Fix | Delete
if ( typeof types === "object" ) {
[5127] Fix | Delete
[5128] Fix | Delete
// ( types-Object, selector, data )
[5129] Fix | Delete
if ( typeof selector !== "string" ) {
[5130] Fix | Delete
[5131] Fix | Delete
// ( types-Object, data )
[5132] Fix | Delete
data = data || selector;
[5133] Fix | Delete
selector = undefined;
[5134] Fix | Delete
}
[5135] Fix | Delete
for ( type in types ) {
[5136] Fix | Delete
on( elem, type, selector, data, types[ type ], one );
[5137] Fix | Delete
}
[5138] Fix | Delete
return elem;
[5139] Fix | Delete
}
[5140] Fix | Delete
[5141] Fix | Delete
if ( data == null && fn == null ) {
[5142] Fix | Delete
[5143] Fix | Delete
// ( types, fn )
[5144] Fix | Delete
fn = selector;
[5145] Fix | Delete
data = selector = undefined;
[5146] Fix | Delete
} else if ( fn == null ) {
[5147] Fix | Delete
if ( typeof selector === "string" ) {
[5148] Fix | Delete
[5149] Fix | Delete
// ( types, selector, fn )
[5150] Fix | Delete
fn = data;
[5151] Fix | Delete
data = undefined;
[5152] Fix | Delete
} else {
[5153] Fix | Delete
[5154] Fix | Delete
// ( types, data, fn )
[5155] Fix | Delete
fn = data;
[5156] Fix | Delete
data = selector;
[5157] Fix | Delete
selector = undefined;
[5158] Fix | Delete
}
[5159] Fix | Delete
}
[5160] Fix | Delete
if ( fn === false ) {
[5161] Fix | Delete
fn = returnFalse;
[5162] Fix | Delete
} else if ( !fn ) {
[5163] Fix | Delete
return elem;
[5164] Fix | Delete
}
[5165] Fix | Delete
[5166] Fix | Delete
if ( one === 1 ) {
[5167] Fix | Delete
origFn = fn;
[5168] Fix | Delete
fn = function( event ) {
[5169] Fix | Delete
[5170] Fix | Delete
// Can use an empty set, since event contains the info
[5171] Fix | Delete
jQuery().off( event );
[5172] Fix | Delete
return origFn.apply( this, arguments );
[5173] Fix | Delete
};
[5174] Fix | Delete
[5175] Fix | Delete
// Use same guid so caller can remove using origFn
[5176] Fix | Delete
fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
[5177] Fix | Delete
}
[5178] Fix | Delete
return elem.each( function() {
[5179] Fix | Delete
jQuery.event.add( this, types, fn, data, selector );
[5180] Fix | Delete
} );
[5181] Fix | Delete
}
[5182] Fix | Delete
[5183] Fix | Delete
/*
[5184] Fix | Delete
* Helper functions for managing events -- not part of the public interface.
[5185] Fix | Delete
* Props to Dean Edwards' addEvent library for many of the ideas.
[5186] Fix | Delete
*/
[5187] Fix | Delete
jQuery.event = {
[5188] Fix | Delete
[5189] Fix | Delete
global: {},
[5190] Fix | Delete
[5191] Fix | Delete
add: function( elem, types, handler, data, selector ) {
[5192] Fix | Delete
[5193] Fix | Delete
var handleObjIn, eventHandle, tmp,
[5194] Fix | Delete
events, t, handleObj,
[5195] Fix | Delete
special, handlers, type, namespaces, origType,
[5196] Fix | Delete
elemData = dataPriv.get( elem );
[5197] Fix | Delete
[5198] Fix | Delete
// Only attach events to objects that accept data
[5199] Fix | Delete
if ( !acceptData( elem ) ) {
[5200] Fix | Delete
return;
[5201] Fix | Delete
}
[5202] Fix | Delete
[5203] Fix | Delete
// Caller can pass in an object of custom data in lieu of the handler
[5204] Fix | Delete
if ( handler.handler ) {
[5205] Fix | Delete
handleObjIn = handler;
[5206] Fix | Delete
handler = handleObjIn.handler;
[5207] Fix | Delete
selector = handleObjIn.selector;
[5208] Fix | Delete
}
[5209] Fix | Delete
[5210] Fix | Delete
// Ensure that invalid selectors throw exceptions at attach time
[5211] Fix | Delete
// Evaluate against documentElement in case elem is a non-element node (e.g., document)
[5212] Fix | Delete
if ( selector ) {
[5213] Fix | Delete
jQuery.find.matchesSelector( documentElement, selector );
[5214] Fix | Delete
}
[5215] Fix | Delete
[5216] Fix | Delete
// Make sure that the handler has a unique ID, used to find/remove it later
[5217] Fix | Delete
if ( !handler.guid ) {
[5218] Fix | Delete
handler.guid = jQuery.guid++;
[5219] Fix | Delete
}
[5220] Fix | Delete
[5221] Fix | Delete
// Init the element's event structure and main handler, if this is the first
[5222] Fix | Delete
if ( !( events = elemData.events ) ) {
[5223] Fix | Delete
events = elemData.events = Object.create( null );
[5224] Fix | Delete
}
[5225] Fix | Delete
if ( !( eventHandle = elemData.handle ) ) {
[5226] Fix | Delete
eventHandle = elemData.handle = function( e ) {
[5227] Fix | Delete
[5228] Fix | Delete
// Discard the second event of a jQuery.event.trigger() and
[5229] Fix | Delete
// when an event is called after a page has unloaded
[5230] Fix | Delete
return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
[5231] Fix | Delete
jQuery.event.dispatch.apply( elem, arguments ) : undefined;
[5232] Fix | Delete
};
[5233] Fix | Delete
}
[5234] Fix | Delete
[5235] Fix | Delete
// Handle multiple events separated by a space
[5236] Fix | Delete
types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
[5237] Fix | Delete
t = types.length;
[5238] Fix | Delete
while ( t-- ) {
[5239] Fix | Delete
tmp = rtypenamespace.exec( types[ t ] ) || [];
[5240] Fix | Delete
type = origType = tmp[ 1 ];
[5241] Fix | Delete
namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
[5242] Fix | Delete
[5243] Fix | Delete
// There *must* be a type, no attaching namespace-only handlers
[5244] Fix | Delete
if ( !type ) {
[5245] Fix | Delete
continue;
[5246] Fix | Delete
}
[5247] Fix | Delete
[5248] Fix | Delete
// If event changes its type, use the special event handlers for the changed type
[5249] Fix | Delete
special = jQuery.event.special[ type ] || {};
[5250] Fix | Delete
[5251] Fix | Delete
// If selector defined, determine special event api type, otherwise given type
[5252] Fix | Delete
type = ( selector ? special.delegateType : special.bindType ) || type;
[5253] Fix | Delete
[5254] Fix | Delete
// Update special based on newly reset type
[5255] Fix | Delete
special = jQuery.event.special[ type ] || {};
[5256] Fix | Delete
[5257] Fix | Delete
// handleObj is passed to all event handlers
[5258] Fix | Delete
handleObj = jQuery.extend( {
[5259] Fix | Delete
type: type,
[5260] Fix | Delete
origType: origType,
[5261] Fix | Delete
data: data,
[5262] Fix | Delete
handler: handler,
[5263] Fix | Delete
guid: handler.guid,
[5264] Fix | Delete
selector: selector,
[5265] Fix | Delete
needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
[5266] Fix | Delete
namespace: namespaces.join( "." )
[5267] Fix | Delete
}, handleObjIn );
[5268] Fix | Delete
[5269] Fix | Delete
// Init the event handler queue if we're the first
[5270] Fix | Delete
if ( !( handlers = events[ type ] ) ) {
[5271] Fix | Delete
handlers = events[ type ] = [];
[5272] Fix | Delete
handlers.delegateCount = 0;
[5273] Fix | Delete
[5274] Fix | Delete
// Only use addEventListener if the special events handler returns false
[5275] Fix | Delete
if ( !special.setup ||
[5276] Fix | Delete
special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
[5277] Fix | Delete
[5278] Fix | Delete
if ( elem.addEventListener ) {
[5279] Fix | Delete
elem.addEventListener( type, eventHandle );
[5280] Fix | Delete
}
[5281] Fix | Delete
}
[5282] Fix | Delete
}
[5283] Fix | Delete
[5284] Fix | Delete
if ( special.add ) {
[5285] Fix | Delete
special.add.call( elem, handleObj );
[5286] Fix | Delete
[5287] Fix | Delete
if ( !handleObj.handler.guid ) {
[5288] Fix | Delete
handleObj.handler.guid = handler.guid;
[5289] Fix | Delete
}
[5290] Fix | Delete
}
[5291] Fix | Delete
[5292] Fix | Delete
// Add to the element's handler list, delegates in front
[5293] Fix | Delete
if ( selector ) {
[5294] Fix | Delete
handlers.splice( handlers.delegateCount++, 0, handleObj );
[5295] Fix | Delete
} else {
[5296] Fix | Delete
handlers.push( handleObj );
[5297] Fix | Delete
}
[5298] Fix | Delete
[5299] Fix | Delete
// Keep track of which events have ever been used, for event optimization
[5300] Fix | Delete
jQuery.event.global[ type ] = true;
[5301] Fix | Delete
}
[5302] Fix | Delete
[5303] Fix | Delete
},
[5304] Fix | Delete
[5305] Fix | Delete
// Detach an event or set of events from an element
[5306] Fix | Delete
remove: function( elem, types, handler, selector, mappedTypes ) {
[5307] Fix | Delete
[5308] Fix | Delete
var j, origCount, tmp,
[5309] Fix | Delete
events, t, handleObj,
[5310] Fix | Delete
special, handlers, type, namespaces, origType,
[5311] Fix | Delete
elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
[5312] Fix | Delete
[5313] Fix | Delete
if ( !elemData || !( events = elemData.events ) ) {
[5314] Fix | Delete
return;
[5315] Fix | Delete
}
[5316] Fix | Delete
[5317] Fix | Delete
// Once for each type.namespace in types; type may be omitted
[5318] Fix | Delete
types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
[5319] Fix | Delete
t = types.length;
[5320] Fix | Delete
while ( t-- ) {
[5321] Fix | Delete
tmp = rtypenamespace.exec( types[ t ] ) || [];
[5322] Fix | Delete
type = origType = tmp[ 1 ];
[5323] Fix | Delete
namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
[5324] Fix | Delete
[5325] Fix | Delete
// Unbind all events (on this namespace, if provided) for the element
[5326] Fix | Delete
if ( !type ) {
[5327] Fix | Delete
for ( type in events ) {
[5328] Fix | Delete
jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
[5329] Fix | Delete
}
[5330] Fix | Delete
continue;
[5331] Fix | Delete
}
[5332] Fix | Delete
[5333] Fix | Delete
special = jQuery.event.special[ type ] || {};
[5334] Fix | Delete
type = ( selector ? special.delegateType : special.bindType ) || type;
[5335] Fix | Delete
handlers = events[ type ] || [];
[5336] Fix | Delete
tmp = tmp[ 2 ] &&
[5337] Fix | Delete
new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
[5338] Fix | Delete
[5339] Fix | Delete
// Remove matching events
[5340] Fix | Delete
origCount = j = handlers.length;
[5341] Fix | Delete
while ( j-- ) {
[5342] Fix | Delete
handleObj = handlers[ j ];
[5343] Fix | Delete
[5344] Fix | Delete
if ( ( mappedTypes || origType === handleObj.origType ) &&
[5345] Fix | Delete
( !handler || handler.guid === handleObj.guid ) &&
[5346] Fix | Delete
( !tmp || tmp.test( handleObj.namespace ) ) &&
[5347] Fix | Delete
( !selector || selector === handleObj.selector ||
[5348] Fix | Delete
selector === "**" && handleObj.selector ) ) {
[5349] Fix | Delete
handlers.splice( j, 1 );
[5350] Fix | Delete
[5351] Fix | Delete
if ( handleObj.selector ) {
[5352] Fix | Delete
handlers.delegateCount--;
[5353] Fix | Delete
}
[5354] Fix | Delete
if ( special.remove ) {
[5355] Fix | Delete
special.remove.call( elem, handleObj );
[5356] Fix | Delete
}
[5357] Fix | Delete
}
[5358] Fix | Delete
}
[5359] Fix | Delete
[5360] Fix | Delete
// Remove generic event handler if we removed something and no more handlers exist
[5361] Fix | Delete
// (avoids potential for endless recursion during removal of special event handlers)
[5362] Fix | Delete
if ( origCount && !handlers.length ) {
[5363] Fix | Delete
if ( !special.teardown ||
[5364] Fix | Delete
special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
[5365] Fix | Delete
[5366] Fix | Delete
jQuery.removeEvent( elem, type, elemData.handle );
[5367] Fix | Delete
}
[5368] Fix | Delete
[5369] Fix | Delete
delete events[ type ];
[5370] Fix | Delete
}
[5371] Fix | Delete
}
[5372] Fix | Delete
[5373] Fix | Delete
// Remove data and the expando if it's no longer used
[5374] Fix | Delete
if ( jQuery.isEmptyObject( events ) ) {
[5375] Fix | Delete
dataPriv.remove( elem, "handle events" );
[5376] Fix | Delete
}
[5377] Fix | Delete
},
[5378] Fix | Delete
[5379] Fix | Delete
dispatch: function( nativeEvent ) {
[5380] Fix | Delete
[5381] Fix | Delete
var i, j, ret, matched, handleObj, handlerQueue,
[5382] Fix | Delete
args = new Array( arguments.length ),
[5383] Fix | Delete
[5384] Fix | Delete
// Make a writable jQuery.Event from the native event object
[5385] Fix | Delete
event = jQuery.event.fix( nativeEvent ),
[5386] Fix | Delete
[5387] Fix | Delete
handlers = (
[5388] Fix | Delete
dataPriv.get( this, "events" ) || Object.create( null )
[5389] Fix | Delete
)[ event.type ] || [],
[5390] Fix | Delete
special = jQuery.event.special[ event.type ] || {};
[5391] Fix | Delete
[5392] Fix | Delete
// Use the fix-ed jQuery.Event rather than the (read-only) native event
[5393] Fix | Delete
args[ 0 ] = event;
[5394] Fix | Delete
[5395] Fix | Delete
for ( i = 1; i < arguments.length; i++ ) {
[5396] Fix | Delete
args[ i ] = arguments[ i ];
[5397] Fix | Delete
}
[5398] Fix | Delete
[5399] Fix | Delete
event.delegateTarget = this;
[5400] Fix | Delete
[5401] Fix | Delete
// Call the preDispatch hook for the mapped type, and let it bail if desired
[5402] Fix | Delete
if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
[5403] Fix | Delete
return;
[5404] Fix | Delete
}
[5405] Fix | Delete
[5406] Fix | Delete
// Determine handlers
[5407] Fix | Delete
handlerQueue = jQuery.event.handlers.call( this, event, handlers );
[5408] Fix | Delete
[5409] Fix | Delete
// Run delegates first; they may want to stop propagation beneath us
[5410] Fix | Delete
i = 0;
[5411] Fix | Delete
while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
[5412] Fix | Delete
event.currentTarget = matched.elem;
[5413] Fix | Delete
[5414] Fix | Delete
j = 0;
[5415] Fix | Delete
while ( ( handleObj = matched.handlers[ j++ ] ) &&
[5416] Fix | Delete
!event.isImmediatePropagationStopped() ) {
[5417] Fix | Delete
[5418] Fix | Delete
// If the event is namespaced, then each handler is only invoked if it is
[5419] Fix | Delete
// specially universal or its namespaces are a superset of the event's.
[5420] Fix | Delete
if ( !event.rnamespace || handleObj.namespace === false ||
[5421] Fix | Delete
event.rnamespace.test( handleObj.namespace ) ) {
[5422] Fix | Delete
[5423] Fix | Delete
event.handleObj = handleObj;
[5424] Fix | Delete
event.data = handleObj.data;
[5425] Fix | Delete
[5426] Fix | Delete
ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
[5427] Fix | Delete
handleObj.handler ).apply( matched.elem, args );
[5428] Fix | Delete
[5429] Fix | Delete
if ( ret !== undefined ) {
[5430] Fix | Delete
if ( ( event.result = ret ) === false ) {
[5431] Fix | Delete
event.preventDefault();
[5432] Fix | Delete
event.stopPropagation();
[5433] Fix | Delete
}
[5434] Fix | Delete
}
[5435] Fix | Delete
}
[5436] Fix | Delete
}
[5437] Fix | Delete
}
[5438] Fix | Delete
[5439] Fix | Delete
// Call the postDispatch hook for the mapped type
[5440] Fix | Delete
if ( special.postDispatch ) {
[5441] Fix | Delete
special.postDispatch.call( this, event );
[5442] Fix | Delete
}
[5443] Fix | Delete
[5444] Fix | Delete
return event.result;
[5445] Fix | Delete
},
[5446] Fix | Delete
[5447] Fix | Delete
handlers: function( event, handlers ) {
[5448] Fix | Delete
var i, handleObj, sel, matchedHandlers, matchedSelectors,
[5449] Fix | Delete
handlerQueue = [],
[5450] Fix | Delete
delegateCount = handlers.delegateCount,
[5451] Fix | Delete
cur = event.target;
[5452] Fix | Delete
[5453] Fix | Delete
// Find delegate handlers
[5454] Fix | Delete
if ( delegateCount &&
[5455] Fix | Delete
[5456] Fix | Delete
// Support: IE <=9
[5457] Fix | Delete
// Black-hole SVG <use> instance trees (trac-13180)
[5458] Fix | Delete
cur.nodeType &&
[5459] Fix | Delete
[5460] Fix | Delete
// Support: Firefox <=42
[5461] Fix | Delete
// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
[5462] Fix | Delete
// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
[5463] Fix | Delete
// Support: IE 11 only
[5464] Fix | Delete
// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
[5465] Fix | Delete
!( event.type === "click" && event.button >= 1 ) ) {
[5466] Fix | Delete
[5467] Fix | Delete
for ( ; cur !== this; cur = cur.parentNode || this ) {
[5468] Fix | Delete
[5469] Fix | Delete
// Don't check non-elements (#13208)
[5470] Fix | Delete
// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
[5471] Fix | Delete
if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
[5472] Fix | Delete
matchedHandlers = [];
[5473] Fix | Delete
matchedSelectors = {};
[5474] Fix | Delete
for ( i = 0; i < delegateCount; i++ ) {
[5475] Fix | Delete
handleObj = handlers[ i ];
[5476] Fix | Delete
[5477] Fix | Delete
// Don't conflict with Object.prototype properties (#13203)
[5478] Fix | Delete
sel = handleObj.selector + " ";
[5479] Fix | Delete
[5480] Fix | Delete
if ( matchedSelectors[ sel ] === undefined ) {
[5481] Fix | Delete
matchedSelectors[ sel ] = handleObj.needsContext ?
[5482] Fix | Delete
jQuery( sel, this ).index( cur ) > -1 :
[5483] Fix | Delete
jQuery.find( sel, this, null, [ cur ] ).length;
[5484] Fix | Delete
}
[5485] Fix | Delete
if ( matchedSelectors[ sel ] ) {
[5486] Fix | Delete
matchedHandlers.push( handleObj );
[5487] Fix | Delete
}
[5488] Fix | Delete
}
[5489] Fix | Delete
if ( matchedHandlers.length ) {
[5490] Fix | Delete
handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
[5491] Fix | Delete
}
[5492] Fix | Delete
}
[5493] Fix | Delete
}
[5494] Fix | Delete
}
[5495] Fix | Delete
[5496] Fix | Delete
// Add the remaining (directly-bound) handlers
[5497] Fix | Delete
cur = this;
[5498] Fix | Delete
if ( delegateCount < handlers.length ) {
[5499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function