Edit File by line
/home/barbar84/www/wp-inclu.../js/jquery
File: jquery.js
matched.push( elem );
[3000] Fix | Delete
}
[3001] Fix | Delete
}
[3002] Fix | Delete
return matched;
[3003] Fix | Delete
};
[3004] Fix | Delete
[3005] Fix | Delete
[3006] Fix | Delete
var siblings = function( n, elem ) {
[3007] Fix | Delete
var matched = [];
[3008] Fix | Delete
[3009] Fix | Delete
for ( ; n; n = n.nextSibling ) {
[3010] Fix | Delete
if ( n.nodeType === 1 && n !== elem ) {
[3011] Fix | Delete
matched.push( n );
[3012] Fix | Delete
}
[3013] Fix | Delete
}
[3014] Fix | Delete
[3015] Fix | Delete
return matched;
[3016] Fix | Delete
};
[3017] Fix | Delete
[3018] Fix | Delete
[3019] Fix | Delete
var rneedsContext = jQuery.expr.match.needsContext;
[3020] Fix | Delete
[3021] Fix | Delete
[3022] Fix | Delete
[3023] Fix | Delete
function nodeName( elem, name ) {
[3024] Fix | Delete
[3025] Fix | Delete
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
[3026] Fix | Delete
[3027] Fix | Delete
};
[3028] Fix | Delete
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
[3029] Fix | Delete
[3030] Fix | Delete
[3031] Fix | Delete
[3032] Fix | Delete
// Implement the identical functionality for filter and not
[3033] Fix | Delete
function winnow( elements, qualifier, not ) {
[3034] Fix | Delete
if ( isFunction( qualifier ) ) {
[3035] Fix | Delete
return jQuery.grep( elements, function( elem, i ) {
[3036] Fix | Delete
return !!qualifier.call( elem, i, elem ) !== not;
[3037] Fix | Delete
} );
[3038] Fix | Delete
}
[3039] Fix | Delete
[3040] Fix | Delete
// Single element
[3041] Fix | Delete
if ( qualifier.nodeType ) {
[3042] Fix | Delete
return jQuery.grep( elements, function( elem ) {
[3043] Fix | Delete
return ( elem === qualifier ) !== not;
[3044] Fix | Delete
} );
[3045] Fix | Delete
}
[3046] Fix | Delete
[3047] Fix | Delete
// Arraylike of elements (jQuery, arguments, Array)
[3048] Fix | Delete
if ( typeof qualifier !== "string" ) {
[3049] Fix | Delete
return jQuery.grep( elements, function( elem ) {
[3050] Fix | Delete
return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
[3051] Fix | Delete
} );
[3052] Fix | Delete
}
[3053] Fix | Delete
[3054] Fix | Delete
// Filtered directly for both simple and complex selectors
[3055] Fix | Delete
return jQuery.filter( qualifier, elements, not );
[3056] Fix | Delete
}
[3057] Fix | Delete
[3058] Fix | Delete
jQuery.filter = function( expr, elems, not ) {
[3059] Fix | Delete
var elem = elems[ 0 ];
[3060] Fix | Delete
[3061] Fix | Delete
if ( not ) {
[3062] Fix | Delete
expr = ":not(" + expr + ")";
[3063] Fix | Delete
}
[3064] Fix | Delete
[3065] Fix | Delete
if ( elems.length === 1 && elem.nodeType === 1 ) {
[3066] Fix | Delete
return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
[3067] Fix | Delete
}
[3068] Fix | Delete
[3069] Fix | Delete
return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
[3070] Fix | Delete
return elem.nodeType === 1;
[3071] Fix | Delete
} ) );
[3072] Fix | Delete
};
[3073] Fix | Delete
[3074] Fix | Delete
jQuery.fn.extend( {
[3075] Fix | Delete
find: function( selector ) {
[3076] Fix | Delete
var i, ret,
[3077] Fix | Delete
len = this.length,
[3078] Fix | Delete
self = this;
[3079] Fix | Delete
[3080] Fix | Delete
if ( typeof selector !== "string" ) {
[3081] Fix | Delete
return this.pushStack( jQuery( selector ).filter( function() {
[3082] Fix | Delete
for ( i = 0; i < len; i++ ) {
[3083] Fix | Delete
if ( jQuery.contains( self[ i ], this ) ) {
[3084] Fix | Delete
return true;
[3085] Fix | Delete
}
[3086] Fix | Delete
}
[3087] Fix | Delete
} ) );
[3088] Fix | Delete
}
[3089] Fix | Delete
[3090] Fix | Delete
ret = this.pushStack( [] );
[3091] Fix | Delete
[3092] Fix | Delete
for ( i = 0; i < len; i++ ) {
[3093] Fix | Delete
jQuery.find( selector, self[ i ], ret );
[3094] Fix | Delete
}
[3095] Fix | Delete
[3096] Fix | Delete
return len > 1 ? jQuery.uniqueSort( ret ) : ret;
[3097] Fix | Delete
},
[3098] Fix | Delete
filter: function( selector ) {
[3099] Fix | Delete
return this.pushStack( winnow( this, selector || [], false ) );
[3100] Fix | Delete
},
[3101] Fix | Delete
not: function( selector ) {
[3102] Fix | Delete
return this.pushStack( winnow( this, selector || [], true ) );
[3103] Fix | Delete
},
[3104] Fix | Delete
is: function( selector ) {
[3105] Fix | Delete
return !!winnow(
[3106] Fix | Delete
this,
[3107] Fix | Delete
[3108] Fix | Delete
// If this is a positional/relative selector, check membership in the returned set
[3109] Fix | Delete
// so $("p:first").is("p:last") won't return true for a doc with two "p".
[3110] Fix | Delete
typeof selector === "string" && rneedsContext.test( selector ) ?
[3111] Fix | Delete
jQuery( selector ) :
[3112] Fix | Delete
selector || [],
[3113] Fix | Delete
false
[3114] Fix | Delete
).length;
[3115] Fix | Delete
}
[3116] Fix | Delete
} );
[3117] Fix | Delete
[3118] Fix | Delete
[3119] Fix | Delete
// Initialize a jQuery object
[3120] Fix | Delete
[3121] Fix | Delete
[3122] Fix | Delete
// A central reference to the root jQuery(document)
[3123] Fix | Delete
var rootjQuery,
[3124] Fix | Delete
[3125] Fix | Delete
// A simple way to check for HTML strings
[3126] Fix | Delete
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
[3127] Fix | Delete
// Strict HTML recognition (#11290: must start with <)
[3128] Fix | Delete
// Shortcut simple #id case for speed
[3129] Fix | Delete
rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
[3130] Fix | Delete
[3131] Fix | Delete
init = jQuery.fn.init = function( selector, context, root ) {
[3132] Fix | Delete
var match, elem;
[3133] Fix | Delete
[3134] Fix | Delete
// HANDLE: $(""), $(null), $(undefined), $(false)
[3135] Fix | Delete
if ( !selector ) {
[3136] Fix | Delete
return this;
[3137] Fix | Delete
}
[3138] Fix | Delete
[3139] Fix | Delete
// Method init() accepts an alternate rootjQuery
[3140] Fix | Delete
// so migrate can support jQuery.sub (gh-2101)
[3141] Fix | Delete
root = root || rootjQuery;
[3142] Fix | Delete
[3143] Fix | Delete
// Handle HTML strings
[3144] Fix | Delete
if ( typeof selector === "string" ) {
[3145] Fix | Delete
if ( selector[ 0 ] === "<" &&
[3146] Fix | Delete
selector[ selector.length - 1 ] === ">" &&
[3147] Fix | Delete
selector.length >= 3 ) {
[3148] Fix | Delete
[3149] Fix | Delete
// Assume that strings that start and end with <> are HTML and skip the regex check
[3150] Fix | Delete
match = [ null, selector, null ];
[3151] Fix | Delete
[3152] Fix | Delete
} else {
[3153] Fix | Delete
match = rquickExpr.exec( selector );
[3154] Fix | Delete
}
[3155] Fix | Delete
[3156] Fix | Delete
// Match html or make sure no context is specified for #id
[3157] Fix | Delete
if ( match && ( match[ 1 ] || !context ) ) {
[3158] Fix | Delete
[3159] Fix | Delete
// HANDLE: $(html) -> $(array)
[3160] Fix | Delete
if ( match[ 1 ] ) {
[3161] Fix | Delete
context = context instanceof jQuery ? context[ 0 ] : context;
[3162] Fix | Delete
[3163] Fix | Delete
// Option to run scripts is true for back-compat
[3164] Fix | Delete
// Intentionally let the error be thrown if parseHTML is not present
[3165] Fix | Delete
jQuery.merge( this, jQuery.parseHTML(
[3166] Fix | Delete
match[ 1 ],
[3167] Fix | Delete
context && context.nodeType ? context.ownerDocument || context : document,
[3168] Fix | Delete
true
[3169] Fix | Delete
) );
[3170] Fix | Delete
[3171] Fix | Delete
// HANDLE: $(html, props)
[3172] Fix | Delete
if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
[3173] Fix | Delete
for ( match in context ) {
[3174] Fix | Delete
[3175] Fix | Delete
// Properties of context are called as methods if possible
[3176] Fix | Delete
if ( isFunction( this[ match ] ) ) {
[3177] Fix | Delete
this[ match ]( context[ match ] );
[3178] Fix | Delete
[3179] Fix | Delete
// ...and otherwise set as attributes
[3180] Fix | Delete
} else {
[3181] Fix | Delete
this.attr( match, context[ match ] );
[3182] Fix | Delete
}
[3183] Fix | Delete
}
[3184] Fix | Delete
}
[3185] Fix | Delete
[3186] Fix | Delete
return this;
[3187] Fix | Delete
[3188] Fix | Delete
// HANDLE: $(#id)
[3189] Fix | Delete
} else {
[3190] Fix | Delete
elem = document.getElementById( match[ 2 ] );
[3191] Fix | Delete
[3192] Fix | Delete
if ( elem ) {
[3193] Fix | Delete
[3194] Fix | Delete
// Inject the element directly into the jQuery object
[3195] Fix | Delete
this[ 0 ] = elem;
[3196] Fix | Delete
this.length = 1;
[3197] Fix | Delete
}
[3198] Fix | Delete
return this;
[3199] Fix | Delete
}
[3200] Fix | Delete
[3201] Fix | Delete
// HANDLE: $(expr, $(...))
[3202] Fix | Delete
} else if ( !context || context.jquery ) {
[3203] Fix | Delete
return ( context || root ).find( selector );
[3204] Fix | Delete
[3205] Fix | Delete
// HANDLE: $(expr, context)
[3206] Fix | Delete
// (which is just equivalent to: $(context).find(expr)
[3207] Fix | Delete
} else {
[3208] Fix | Delete
return this.constructor( context ).find( selector );
[3209] Fix | Delete
}
[3210] Fix | Delete
[3211] Fix | Delete
// HANDLE: $(DOMElement)
[3212] Fix | Delete
} else if ( selector.nodeType ) {
[3213] Fix | Delete
this[ 0 ] = selector;
[3214] Fix | Delete
this.length = 1;
[3215] Fix | Delete
return this;
[3216] Fix | Delete
[3217] Fix | Delete
// HANDLE: $(function)
[3218] Fix | Delete
// Shortcut for document ready
[3219] Fix | Delete
} else if ( isFunction( selector ) ) {
[3220] Fix | Delete
return root.ready !== undefined ?
[3221] Fix | Delete
root.ready( selector ) :
[3222] Fix | Delete
[3223] Fix | Delete
// Execute immediately if ready is not present
[3224] Fix | Delete
selector( jQuery );
[3225] Fix | Delete
}
[3226] Fix | Delete
[3227] Fix | Delete
return jQuery.makeArray( selector, this );
[3228] Fix | Delete
};
[3229] Fix | Delete
[3230] Fix | Delete
// Give the init function the jQuery prototype for later instantiation
[3231] Fix | Delete
init.prototype = jQuery.fn;
[3232] Fix | Delete
[3233] Fix | Delete
// Initialize central reference
[3234] Fix | Delete
rootjQuery = jQuery( document );
[3235] Fix | Delete
[3236] Fix | Delete
[3237] Fix | Delete
var rparentsprev = /^(?:parents|prev(?:Until|All))/,
[3238] Fix | Delete
[3239] Fix | Delete
// Methods guaranteed to produce a unique set when starting from a unique set
[3240] Fix | Delete
guaranteedUnique = {
[3241] Fix | Delete
children: true,
[3242] Fix | Delete
contents: true,
[3243] Fix | Delete
next: true,
[3244] Fix | Delete
prev: true
[3245] Fix | Delete
};
[3246] Fix | Delete
[3247] Fix | Delete
jQuery.fn.extend( {
[3248] Fix | Delete
has: function( target ) {
[3249] Fix | Delete
var targets = jQuery( target, this ),
[3250] Fix | Delete
l = targets.length;
[3251] Fix | Delete
[3252] Fix | Delete
return this.filter( function() {
[3253] Fix | Delete
var i = 0;
[3254] Fix | Delete
for ( ; i < l; i++ ) {
[3255] Fix | Delete
if ( jQuery.contains( this, targets[ i ] ) ) {
[3256] Fix | Delete
return true;
[3257] Fix | Delete
}
[3258] Fix | Delete
}
[3259] Fix | Delete
} );
[3260] Fix | Delete
},
[3261] Fix | Delete
[3262] Fix | Delete
closest: function( selectors, context ) {
[3263] Fix | Delete
var cur,
[3264] Fix | Delete
i = 0,
[3265] Fix | Delete
l = this.length,
[3266] Fix | Delete
matched = [],
[3267] Fix | Delete
targets = typeof selectors !== "string" && jQuery( selectors );
[3268] Fix | Delete
[3269] Fix | Delete
// Positional selectors never match, since there's no _selection_ context
[3270] Fix | Delete
if ( !rneedsContext.test( selectors ) ) {
[3271] Fix | Delete
for ( ; i < l; i++ ) {
[3272] Fix | Delete
for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
[3273] Fix | Delete
[3274] Fix | Delete
// Always skip document fragments
[3275] Fix | Delete
if ( cur.nodeType < 11 && ( targets ?
[3276] Fix | Delete
targets.index( cur ) > -1 :
[3277] Fix | Delete
[3278] Fix | Delete
// Don't pass non-elements to Sizzle
[3279] Fix | Delete
cur.nodeType === 1 &&
[3280] Fix | Delete
jQuery.find.matchesSelector( cur, selectors ) ) ) {
[3281] Fix | Delete
[3282] Fix | Delete
matched.push( cur );
[3283] Fix | Delete
break;
[3284] Fix | Delete
}
[3285] Fix | Delete
}
[3286] Fix | Delete
}
[3287] Fix | Delete
}
[3288] Fix | Delete
[3289] Fix | Delete
return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
[3290] Fix | Delete
},
[3291] Fix | Delete
[3292] Fix | Delete
// Determine the position of an element within the set
[3293] Fix | Delete
index: function( elem ) {
[3294] Fix | Delete
[3295] Fix | Delete
// No argument, return index in parent
[3296] Fix | Delete
if ( !elem ) {
[3297] Fix | Delete
return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
[3298] Fix | Delete
}
[3299] Fix | Delete
[3300] Fix | Delete
// Index in selector
[3301] Fix | Delete
if ( typeof elem === "string" ) {
[3302] Fix | Delete
return indexOf.call( jQuery( elem ), this[ 0 ] );
[3303] Fix | Delete
}
[3304] Fix | Delete
[3305] Fix | Delete
// Locate the position of the desired element
[3306] Fix | Delete
return indexOf.call( this,
[3307] Fix | Delete
[3308] Fix | Delete
// If it receives a jQuery object, the first element is used
[3309] Fix | Delete
elem.jquery ? elem[ 0 ] : elem
[3310] Fix | Delete
);
[3311] Fix | Delete
},
[3312] Fix | Delete
[3313] Fix | Delete
add: function( selector, context ) {
[3314] Fix | Delete
return this.pushStack(
[3315] Fix | Delete
jQuery.uniqueSort(
[3316] Fix | Delete
jQuery.merge( this.get(), jQuery( selector, context ) )
[3317] Fix | Delete
)
[3318] Fix | Delete
);
[3319] Fix | Delete
},
[3320] Fix | Delete
[3321] Fix | Delete
addBack: function( selector ) {
[3322] Fix | Delete
return this.add( selector == null ?
[3323] Fix | Delete
this.prevObject : this.prevObject.filter( selector )
[3324] Fix | Delete
);
[3325] Fix | Delete
}
[3326] Fix | Delete
} );
[3327] Fix | Delete
[3328] Fix | Delete
function sibling( cur, dir ) {
[3329] Fix | Delete
while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
[3330] Fix | Delete
return cur;
[3331] Fix | Delete
}
[3332] Fix | Delete
[3333] Fix | Delete
jQuery.each( {
[3334] Fix | Delete
parent: function( elem ) {
[3335] Fix | Delete
var parent = elem.parentNode;
[3336] Fix | Delete
return parent && parent.nodeType !== 11 ? parent : null;
[3337] Fix | Delete
},
[3338] Fix | Delete
parents: function( elem ) {
[3339] Fix | Delete
return dir( elem, "parentNode" );
[3340] Fix | Delete
},
[3341] Fix | Delete
parentsUntil: function( elem, _i, until ) {
[3342] Fix | Delete
return dir( elem, "parentNode", until );
[3343] Fix | Delete
},
[3344] Fix | Delete
next: function( elem ) {
[3345] Fix | Delete
return sibling( elem, "nextSibling" );
[3346] Fix | Delete
},
[3347] Fix | Delete
prev: function( elem ) {
[3348] Fix | Delete
return sibling( elem, "previousSibling" );
[3349] Fix | Delete
},
[3350] Fix | Delete
nextAll: function( elem ) {
[3351] Fix | Delete
return dir( elem, "nextSibling" );
[3352] Fix | Delete
},
[3353] Fix | Delete
prevAll: function( elem ) {
[3354] Fix | Delete
return dir( elem, "previousSibling" );
[3355] Fix | Delete
},
[3356] Fix | Delete
nextUntil: function( elem, _i, until ) {
[3357] Fix | Delete
return dir( elem, "nextSibling", until );
[3358] Fix | Delete
},
[3359] Fix | Delete
prevUntil: function( elem, _i, until ) {
[3360] Fix | Delete
return dir( elem, "previousSibling", until );
[3361] Fix | Delete
},
[3362] Fix | Delete
siblings: function( elem ) {
[3363] Fix | Delete
return siblings( ( elem.parentNode || {} ).firstChild, elem );
[3364] Fix | Delete
},
[3365] Fix | Delete
children: function( elem ) {
[3366] Fix | Delete
return siblings( elem.firstChild );
[3367] Fix | Delete
},
[3368] Fix | Delete
contents: function( elem ) {
[3369] Fix | Delete
if ( elem.contentDocument != null &&
[3370] Fix | Delete
[3371] Fix | Delete
// Support: IE 11+
[3372] Fix | Delete
// <object> elements with no `data` attribute has an object
[3373] Fix | Delete
// `contentDocument` with a `null` prototype.
[3374] Fix | Delete
getProto( elem.contentDocument ) ) {
[3375] Fix | Delete
[3376] Fix | Delete
return elem.contentDocument;
[3377] Fix | Delete
}
[3378] Fix | Delete
[3379] Fix | Delete
// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
[3380] Fix | Delete
// Treat the template element as a regular one in browsers that
[3381] Fix | Delete
// don't support it.
[3382] Fix | Delete
if ( nodeName( elem, "template" ) ) {
[3383] Fix | Delete
elem = elem.content || elem;
[3384] Fix | Delete
}
[3385] Fix | Delete
[3386] Fix | Delete
return jQuery.merge( [], elem.childNodes );
[3387] Fix | Delete
}
[3388] Fix | Delete
}, function( name, fn ) {
[3389] Fix | Delete
jQuery.fn[ name ] = function( until, selector ) {
[3390] Fix | Delete
var matched = jQuery.map( this, fn, until );
[3391] Fix | Delete
[3392] Fix | Delete
if ( name.slice( -5 ) !== "Until" ) {
[3393] Fix | Delete
selector = until;
[3394] Fix | Delete
}
[3395] Fix | Delete
[3396] Fix | Delete
if ( selector && typeof selector === "string" ) {
[3397] Fix | Delete
matched = jQuery.filter( selector, matched );
[3398] Fix | Delete
}
[3399] Fix | Delete
[3400] Fix | Delete
if ( this.length > 1 ) {
[3401] Fix | Delete
[3402] Fix | Delete
// Remove duplicates
[3403] Fix | Delete
if ( !guaranteedUnique[ name ] ) {
[3404] Fix | Delete
jQuery.uniqueSort( matched );
[3405] Fix | Delete
}
[3406] Fix | Delete
[3407] Fix | Delete
// Reverse order for parents* and prev-derivatives
[3408] Fix | Delete
if ( rparentsprev.test( name ) ) {
[3409] Fix | Delete
matched.reverse();
[3410] Fix | Delete
}
[3411] Fix | Delete
}
[3412] Fix | Delete
[3413] Fix | Delete
return this.pushStack( matched );
[3414] Fix | Delete
};
[3415] Fix | Delete
} );
[3416] Fix | Delete
var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );
[3417] Fix | Delete
[3418] Fix | Delete
[3419] Fix | Delete
[3420] Fix | Delete
// Convert String-formatted options into Object-formatted ones
[3421] Fix | Delete
function createOptions( options ) {
[3422] Fix | Delete
var object = {};
[3423] Fix | Delete
jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
[3424] Fix | Delete
object[ flag ] = true;
[3425] Fix | Delete
} );
[3426] Fix | Delete
return object;
[3427] Fix | Delete
}
[3428] Fix | Delete
[3429] Fix | Delete
/*
[3430] Fix | Delete
* Create a callback list using the following parameters:
[3431] Fix | Delete
*
[3432] Fix | Delete
* options: an optional list of space-separated options that will change how
[3433] Fix | Delete
* the callback list behaves or a more traditional option object
[3434] Fix | Delete
*
[3435] Fix | Delete
* By default a callback list will act like an event callback list and can be
[3436] Fix | Delete
* "fired" multiple times.
[3437] Fix | Delete
*
[3438] Fix | Delete
* Possible options:
[3439] Fix | Delete
*
[3440] Fix | Delete
* once: will ensure the callback list can only be fired once (like a Deferred)
[3441] Fix | Delete
*
[3442] Fix | Delete
* memory: will keep track of previous values and will call any callback added
[3443] Fix | Delete
* after the list has been fired right away with the latest "memorized"
[3444] Fix | Delete
* values (like a Deferred)
[3445] Fix | Delete
*
[3446] Fix | Delete
* unique: will ensure a callback can only be added once (no duplicate in the list)
[3447] Fix | Delete
*
[3448] Fix | Delete
* stopOnFalse: interrupt callings when a callback returns false
[3449] Fix | Delete
*
[3450] Fix | Delete
*/
[3451] Fix | Delete
jQuery.Callbacks = function( options ) {
[3452] Fix | Delete
[3453] Fix | Delete
// Convert options from String-formatted to Object-formatted if needed
[3454] Fix | Delete
// (we check in cache first)
[3455] Fix | Delete
options = typeof options === "string" ?
[3456] Fix | Delete
createOptions( options ) :
[3457] Fix | Delete
jQuery.extend( {}, options );
[3458] Fix | Delete
[3459] Fix | Delete
var // Flag to know if list is currently firing
[3460] Fix | Delete
firing,
[3461] Fix | Delete
[3462] Fix | Delete
// Last fire value for non-forgettable lists
[3463] Fix | Delete
memory,
[3464] Fix | Delete
[3465] Fix | Delete
// Flag to know if list was already fired
[3466] Fix | Delete
fired,
[3467] Fix | Delete
[3468] Fix | Delete
// Flag to prevent firing
[3469] Fix | Delete
locked,
[3470] Fix | Delete
[3471] Fix | Delete
// Actual callback list
[3472] Fix | Delete
list = [],
[3473] Fix | Delete
[3474] Fix | Delete
// Queue of execution data for repeatable lists
[3475] Fix | Delete
queue = [],
[3476] Fix | Delete
[3477] Fix | Delete
// Index of currently firing callback (modified by add/remove as needed)
[3478] Fix | Delete
firingIndex = -1,
[3479] Fix | Delete
[3480] Fix | Delete
// Fire callbacks
[3481] Fix | Delete
fire = function() {
[3482] Fix | Delete
[3483] Fix | Delete
// Enforce single-firing
[3484] Fix | Delete
locked = locked || options.once;
[3485] Fix | Delete
[3486] Fix | Delete
// Execute callbacks for all pending executions,
[3487] Fix | Delete
// respecting firingIndex overrides and runtime changes
[3488] Fix | Delete
fired = firing = true;
[3489] Fix | Delete
for ( ; queue.length; firingIndex = -1 ) {
[3490] Fix | Delete
memory = queue.shift();
[3491] Fix | Delete
while ( ++firingIndex < list.length ) {
[3492] Fix | Delete
[3493] Fix | Delete
// Run callback and check for early termination
[3494] Fix | Delete
if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
[3495] Fix | Delete
options.stopOnFalse ) {
[3496] Fix | Delete
[3497] Fix | Delete
// Jump to end and forget the data so .add doesn't re-fire
[3498] Fix | Delete
firingIndex = list.length;
[3499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function