Edit File by line
/home/barbar84/www/wp-inclu.../js/jquery
File: jquery.js
[8500] Fix | Delete
jQuery.extend( {
[8501] Fix | Delete
valHooks: {
[8502] Fix | Delete
option: {
[8503] Fix | Delete
get: function( elem ) {
[8504] Fix | Delete
[8505] Fix | Delete
var val = jQuery.find.attr( elem, "value" );
[8506] Fix | Delete
return val != null ?
[8507] Fix | Delete
val :
[8508] Fix | Delete
[8509] Fix | Delete
// Support: IE <=10 - 11 only
[8510] Fix | Delete
// option.text throws exceptions (#14686, #14858)
[8511] Fix | Delete
// Strip and collapse whitespace
[8512] Fix | Delete
// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
[8513] Fix | Delete
stripAndCollapse( jQuery.text( elem ) );
[8514] Fix | Delete
}
[8515] Fix | Delete
},
[8516] Fix | Delete
select: {
[8517] Fix | Delete
get: function( elem ) {
[8518] Fix | Delete
var value, option, i,
[8519] Fix | Delete
options = elem.options,
[8520] Fix | Delete
index = elem.selectedIndex,
[8521] Fix | Delete
one = elem.type === "select-one",
[8522] Fix | Delete
values = one ? null : [],
[8523] Fix | Delete
max = one ? index + 1 : options.length;
[8524] Fix | Delete
[8525] Fix | Delete
if ( index < 0 ) {
[8526] Fix | Delete
i = max;
[8527] Fix | Delete
[8528] Fix | Delete
} else {
[8529] Fix | Delete
i = one ? index : 0;
[8530] Fix | Delete
}
[8531] Fix | Delete
[8532] Fix | Delete
// Loop through all the selected options
[8533] Fix | Delete
for ( ; i < max; i++ ) {
[8534] Fix | Delete
option = options[ i ];
[8535] Fix | Delete
[8536] Fix | Delete
// Support: IE <=9 only
[8537] Fix | Delete
// IE8-9 doesn't update selected after form reset (#2551)
[8538] Fix | Delete
if ( ( option.selected || i === index ) &&
[8539] Fix | Delete
[8540] Fix | Delete
// Don't return options that are disabled or in a disabled optgroup
[8541] Fix | Delete
!option.disabled &&
[8542] Fix | Delete
( !option.parentNode.disabled ||
[8543] Fix | Delete
!nodeName( option.parentNode, "optgroup" ) ) ) {
[8544] Fix | Delete
[8545] Fix | Delete
// Get the specific value for the option
[8546] Fix | Delete
value = jQuery( option ).val();
[8547] Fix | Delete
[8548] Fix | Delete
// We don't need an array for one selects
[8549] Fix | Delete
if ( one ) {
[8550] Fix | Delete
return value;
[8551] Fix | Delete
}
[8552] Fix | Delete
[8553] Fix | Delete
// Multi-Selects return an array
[8554] Fix | Delete
values.push( value );
[8555] Fix | Delete
}
[8556] Fix | Delete
}
[8557] Fix | Delete
[8558] Fix | Delete
return values;
[8559] Fix | Delete
},
[8560] Fix | Delete
[8561] Fix | Delete
set: function( elem, value ) {
[8562] Fix | Delete
var optionSet, option,
[8563] Fix | Delete
options = elem.options,
[8564] Fix | Delete
values = jQuery.makeArray( value ),
[8565] Fix | Delete
i = options.length;
[8566] Fix | Delete
[8567] Fix | Delete
while ( i-- ) {
[8568] Fix | Delete
option = options[ i ];
[8569] Fix | Delete
[8570] Fix | Delete
/* eslint-disable no-cond-assign */
[8571] Fix | Delete
[8572] Fix | Delete
if ( option.selected =
[8573] Fix | Delete
jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
[8574] Fix | Delete
) {
[8575] Fix | Delete
optionSet = true;
[8576] Fix | Delete
}
[8577] Fix | Delete
[8578] Fix | Delete
/* eslint-enable no-cond-assign */
[8579] Fix | Delete
}
[8580] Fix | Delete
[8581] Fix | Delete
// Force browsers to behave consistently when non-matching value is set
[8582] Fix | Delete
if ( !optionSet ) {
[8583] Fix | Delete
elem.selectedIndex = -1;
[8584] Fix | Delete
}
[8585] Fix | Delete
return values;
[8586] Fix | Delete
}
[8587] Fix | Delete
}
[8588] Fix | Delete
}
[8589] Fix | Delete
} );
[8590] Fix | Delete
[8591] Fix | Delete
// Radios and checkboxes getter/setter
[8592] Fix | Delete
jQuery.each( [ "radio", "checkbox" ], function() {
[8593] Fix | Delete
jQuery.valHooks[ this ] = {
[8594] Fix | Delete
set: function( elem, value ) {
[8595] Fix | Delete
if ( Array.isArray( value ) ) {
[8596] Fix | Delete
return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
[8597] Fix | Delete
}
[8598] Fix | Delete
}
[8599] Fix | Delete
};
[8600] Fix | Delete
if ( !support.checkOn ) {
[8601] Fix | Delete
jQuery.valHooks[ this ].get = function( elem ) {
[8602] Fix | Delete
return elem.getAttribute( "value" ) === null ? "on" : elem.value;
[8603] Fix | Delete
};
[8604] Fix | Delete
}
[8605] Fix | Delete
} );
[8606] Fix | Delete
[8607] Fix | Delete
[8608] Fix | Delete
[8609] Fix | Delete
[8610] Fix | Delete
// Return jQuery for attributes-only inclusion
[8611] Fix | Delete
[8612] Fix | Delete
[8613] Fix | Delete
support.focusin = "onfocusin" in window;
[8614] Fix | Delete
[8615] Fix | Delete
[8616] Fix | Delete
var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
[8617] Fix | Delete
stopPropagationCallback = function( e ) {
[8618] Fix | Delete
e.stopPropagation();
[8619] Fix | Delete
};
[8620] Fix | Delete
[8621] Fix | Delete
jQuery.extend( jQuery.event, {
[8622] Fix | Delete
[8623] Fix | Delete
trigger: function( event, data, elem, onlyHandlers ) {
[8624] Fix | Delete
[8625] Fix | Delete
var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
[8626] Fix | Delete
eventPath = [ elem || document ],
[8627] Fix | Delete
type = hasOwn.call( event, "type" ) ? event.type : event,
[8628] Fix | Delete
namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
[8629] Fix | Delete
[8630] Fix | Delete
cur = lastElement = tmp = elem = elem || document;
[8631] Fix | Delete
[8632] Fix | Delete
// Don't do events on text and comment nodes
[8633] Fix | Delete
if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
[8634] Fix | Delete
return;
[8635] Fix | Delete
}
[8636] Fix | Delete
[8637] Fix | Delete
// focus/blur morphs to focusin/out; ensure we're not firing them right now
[8638] Fix | Delete
if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
[8639] Fix | Delete
return;
[8640] Fix | Delete
}
[8641] Fix | Delete
[8642] Fix | Delete
if ( type.indexOf( "." ) > -1 ) {
[8643] Fix | Delete
[8644] Fix | Delete
// Namespaced trigger; create a regexp to match event type in handle()
[8645] Fix | Delete
namespaces = type.split( "." );
[8646] Fix | Delete
type = namespaces.shift();
[8647] Fix | Delete
namespaces.sort();
[8648] Fix | Delete
}
[8649] Fix | Delete
ontype = type.indexOf( ":" ) < 0 && "on" + type;
[8650] Fix | Delete
[8651] Fix | Delete
// Caller can pass in a jQuery.Event object, Object, or just an event type string
[8652] Fix | Delete
event = event[ jQuery.expando ] ?
[8653] Fix | Delete
event :
[8654] Fix | Delete
new jQuery.Event( type, typeof event === "object" && event );
[8655] Fix | Delete
[8656] Fix | Delete
// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
[8657] Fix | Delete
event.isTrigger = onlyHandlers ? 2 : 3;
[8658] Fix | Delete
event.namespace = namespaces.join( "." );
[8659] Fix | Delete
event.rnamespace = event.namespace ?
[8660] Fix | Delete
new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
[8661] Fix | Delete
null;
[8662] Fix | Delete
[8663] Fix | Delete
// Clean up the event in case it is being reused
[8664] Fix | Delete
event.result = undefined;
[8665] Fix | Delete
if ( !event.target ) {
[8666] Fix | Delete
event.target = elem;
[8667] Fix | Delete
}
[8668] Fix | Delete
[8669] Fix | Delete
// Clone any incoming data and prepend the event, creating the handler arg list
[8670] Fix | Delete
data = data == null ?
[8671] Fix | Delete
[ event ] :
[8672] Fix | Delete
jQuery.makeArray( data, [ event ] );
[8673] Fix | Delete
[8674] Fix | Delete
// Allow special events to draw outside the lines
[8675] Fix | Delete
special = jQuery.event.special[ type ] || {};
[8676] Fix | Delete
if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
[8677] Fix | Delete
return;
[8678] Fix | Delete
}
[8679] Fix | Delete
[8680] Fix | Delete
// Determine event propagation path in advance, per W3C events spec (#9951)
[8681] Fix | Delete
// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
[8682] Fix | Delete
if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {
[8683] Fix | Delete
[8684] Fix | Delete
bubbleType = special.delegateType || type;
[8685] Fix | Delete
if ( !rfocusMorph.test( bubbleType + type ) ) {
[8686] Fix | Delete
cur = cur.parentNode;
[8687] Fix | Delete
}
[8688] Fix | Delete
for ( ; cur; cur = cur.parentNode ) {
[8689] Fix | Delete
eventPath.push( cur );
[8690] Fix | Delete
tmp = cur;
[8691] Fix | Delete
}
[8692] Fix | Delete
[8693] Fix | Delete
// Only add window if we got to document (e.g., not plain obj or detached DOM)
[8694] Fix | Delete
if ( tmp === ( elem.ownerDocument || document ) ) {
[8695] Fix | Delete
eventPath.push( tmp.defaultView || tmp.parentWindow || window );
[8696] Fix | Delete
}
[8697] Fix | Delete
}
[8698] Fix | Delete
[8699] Fix | Delete
// Fire handlers on the event path
[8700] Fix | Delete
i = 0;
[8701] Fix | Delete
while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
[8702] Fix | Delete
lastElement = cur;
[8703] Fix | Delete
event.type = i > 1 ?
[8704] Fix | Delete
bubbleType :
[8705] Fix | Delete
special.bindType || type;
[8706] Fix | Delete
[8707] Fix | Delete
// jQuery handler
[8708] Fix | Delete
handle = (
[8709] Fix | Delete
dataPriv.get( cur, "events" ) || Object.create( null )
[8710] Fix | Delete
)[ event.type ] &&
[8711] Fix | Delete
dataPriv.get( cur, "handle" );
[8712] Fix | Delete
if ( handle ) {
[8713] Fix | Delete
handle.apply( cur, data );
[8714] Fix | Delete
}
[8715] Fix | Delete
[8716] Fix | Delete
// Native handler
[8717] Fix | Delete
handle = ontype && cur[ ontype ];
[8718] Fix | Delete
if ( handle && handle.apply && acceptData( cur ) ) {
[8719] Fix | Delete
event.result = handle.apply( cur, data );
[8720] Fix | Delete
if ( event.result === false ) {
[8721] Fix | Delete
event.preventDefault();
[8722] Fix | Delete
}
[8723] Fix | Delete
}
[8724] Fix | Delete
}
[8725] Fix | Delete
event.type = type;
[8726] Fix | Delete
[8727] Fix | Delete
// If nobody prevented the default action, do it now
[8728] Fix | Delete
if ( !onlyHandlers && !event.isDefaultPrevented() ) {
[8729] Fix | Delete
[8730] Fix | Delete
if ( ( !special._default ||
[8731] Fix | Delete
special._default.apply( eventPath.pop(), data ) === false ) &&
[8732] Fix | Delete
acceptData( elem ) ) {
[8733] Fix | Delete
[8734] Fix | Delete
// Call a native DOM method on the target with the same name as the event.
[8735] Fix | Delete
// Don't do default actions on window, that's where global variables be (#6170)
[8736] Fix | Delete
if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {
[8737] Fix | Delete
[8738] Fix | Delete
// Don't re-trigger an onFOO event when we call its FOO() method
[8739] Fix | Delete
tmp = elem[ ontype ];
[8740] Fix | Delete
[8741] Fix | Delete
if ( tmp ) {
[8742] Fix | Delete
elem[ ontype ] = null;
[8743] Fix | Delete
}
[8744] Fix | Delete
[8745] Fix | Delete
// Prevent re-triggering of the same event, since we already bubbled it above
[8746] Fix | Delete
jQuery.event.triggered = type;
[8747] Fix | Delete
[8748] Fix | Delete
if ( event.isPropagationStopped() ) {
[8749] Fix | Delete
lastElement.addEventListener( type, stopPropagationCallback );
[8750] Fix | Delete
}
[8751] Fix | Delete
[8752] Fix | Delete
elem[ type ]();
[8753] Fix | Delete
[8754] Fix | Delete
if ( event.isPropagationStopped() ) {
[8755] Fix | Delete
lastElement.removeEventListener( type, stopPropagationCallback );
[8756] Fix | Delete
}
[8757] Fix | Delete
[8758] Fix | Delete
jQuery.event.triggered = undefined;
[8759] Fix | Delete
[8760] Fix | Delete
if ( tmp ) {
[8761] Fix | Delete
elem[ ontype ] = tmp;
[8762] Fix | Delete
}
[8763] Fix | Delete
}
[8764] Fix | Delete
}
[8765] Fix | Delete
}
[8766] Fix | Delete
[8767] Fix | Delete
return event.result;
[8768] Fix | Delete
},
[8769] Fix | Delete
[8770] Fix | Delete
// Piggyback on a donor event to simulate a different one
[8771] Fix | Delete
// Used only for `focus(in | out)` events
[8772] Fix | Delete
simulate: function( type, elem, event ) {
[8773] Fix | Delete
var e = jQuery.extend(
[8774] Fix | Delete
new jQuery.Event(),
[8775] Fix | Delete
event,
[8776] Fix | Delete
{
[8777] Fix | Delete
type: type,
[8778] Fix | Delete
isSimulated: true
[8779] Fix | Delete
}
[8780] Fix | Delete
);
[8781] Fix | Delete
[8782] Fix | Delete
jQuery.event.trigger( e, null, elem );
[8783] Fix | Delete
}
[8784] Fix | Delete
[8785] Fix | Delete
} );
[8786] Fix | Delete
[8787] Fix | Delete
jQuery.fn.extend( {
[8788] Fix | Delete
[8789] Fix | Delete
trigger: function( type, data ) {
[8790] Fix | Delete
return this.each( function() {
[8791] Fix | Delete
jQuery.event.trigger( type, data, this );
[8792] Fix | Delete
} );
[8793] Fix | Delete
},
[8794] Fix | Delete
triggerHandler: function( type, data ) {
[8795] Fix | Delete
var elem = this[ 0 ];
[8796] Fix | Delete
if ( elem ) {
[8797] Fix | Delete
return jQuery.event.trigger( type, data, elem, true );
[8798] Fix | Delete
}
[8799] Fix | Delete
}
[8800] Fix | Delete
} );
[8801] Fix | Delete
[8802] Fix | Delete
[8803] Fix | Delete
// Support: Firefox <=44
[8804] Fix | Delete
// Firefox doesn't have focus(in | out) events
[8805] Fix | Delete
// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
[8806] Fix | Delete
//
[8807] Fix | Delete
// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
[8808] Fix | Delete
// focus(in | out) events fire after focus & blur events,
[8809] Fix | Delete
// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
[8810] Fix | Delete
// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
[8811] Fix | Delete
if ( !support.focusin ) {
[8812] Fix | Delete
jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
[8813] Fix | Delete
[8814] Fix | Delete
// Attach a single capturing handler on the document while someone wants focusin/focusout
[8815] Fix | Delete
var handler = function( event ) {
[8816] Fix | Delete
jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
[8817] Fix | Delete
};
[8818] Fix | Delete
[8819] Fix | Delete
jQuery.event.special[ fix ] = {
[8820] Fix | Delete
setup: function() {
[8821] Fix | Delete
[8822] Fix | Delete
// Handle: regular nodes (via `this.ownerDocument`), window
[8823] Fix | Delete
// (via `this.document`) & document (via `this`).
[8824] Fix | Delete
var doc = this.ownerDocument || this.document || this,
[8825] Fix | Delete
attaches = dataPriv.access( doc, fix );
[8826] Fix | Delete
[8827] Fix | Delete
if ( !attaches ) {
[8828] Fix | Delete
doc.addEventListener( orig, handler, true );
[8829] Fix | Delete
}
[8830] Fix | Delete
dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
[8831] Fix | Delete
},
[8832] Fix | Delete
teardown: function() {
[8833] Fix | Delete
var doc = this.ownerDocument || this.document || this,
[8834] Fix | Delete
attaches = dataPriv.access( doc, fix ) - 1;
[8835] Fix | Delete
[8836] Fix | Delete
if ( !attaches ) {
[8837] Fix | Delete
doc.removeEventListener( orig, handler, true );
[8838] Fix | Delete
dataPriv.remove( doc, fix );
[8839] Fix | Delete
[8840] Fix | Delete
} else {
[8841] Fix | Delete
dataPriv.access( doc, fix, attaches );
[8842] Fix | Delete
}
[8843] Fix | Delete
}
[8844] Fix | Delete
};
[8845] Fix | Delete
} );
[8846] Fix | Delete
}
[8847] Fix | Delete
var location = window.location;
[8848] Fix | Delete
[8849] Fix | Delete
var nonce = { guid: Date.now() };
[8850] Fix | Delete
[8851] Fix | Delete
var rquery = ( /\?/ );
[8852] Fix | Delete
[8853] Fix | Delete
[8854] Fix | Delete
[8855] Fix | Delete
// Cross-browser xml parsing
[8856] Fix | Delete
jQuery.parseXML = function( data ) {
[8857] Fix | Delete
var xml;
[8858] Fix | Delete
if ( !data || typeof data !== "string" ) {
[8859] Fix | Delete
return null;
[8860] Fix | Delete
}
[8861] Fix | Delete
[8862] Fix | Delete
// Support: IE 9 - 11 only
[8863] Fix | Delete
// IE throws on parseFromString with invalid input.
[8864] Fix | Delete
try {
[8865] Fix | Delete
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
[8866] Fix | Delete
} catch ( e ) {
[8867] Fix | Delete
xml = undefined;
[8868] Fix | Delete
}
[8869] Fix | Delete
[8870] Fix | Delete
if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
[8871] Fix | Delete
jQuery.error( "Invalid XML: " + data );
[8872] Fix | Delete
}
[8873] Fix | Delete
return xml;
[8874] Fix | Delete
};
[8875] Fix | Delete
[8876] Fix | Delete
[8877] Fix | Delete
var
[8878] Fix | Delete
rbracket = /\[\]$/,
[8879] Fix | Delete
rCRLF = /\r?\n/g,
[8880] Fix | Delete
rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
[8881] Fix | Delete
rsubmittable = /^(?:input|select|textarea|keygen)/i;
[8882] Fix | Delete
[8883] Fix | Delete
function buildParams( prefix, obj, traditional, add ) {
[8884] Fix | Delete
var name;
[8885] Fix | Delete
[8886] Fix | Delete
if ( Array.isArray( obj ) ) {
[8887] Fix | Delete
[8888] Fix | Delete
// Serialize array item.
[8889] Fix | Delete
jQuery.each( obj, function( i, v ) {
[8890] Fix | Delete
if ( traditional || rbracket.test( prefix ) ) {
[8891] Fix | Delete
[8892] Fix | Delete
// Treat each array item as a scalar.
[8893] Fix | Delete
add( prefix, v );
[8894] Fix | Delete
[8895] Fix | Delete
} else {
[8896] Fix | Delete
[8897] Fix | Delete
// Item is non-scalar (array or object), encode its numeric index.
[8898] Fix | Delete
buildParams(
[8899] Fix | Delete
prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
[8900] Fix | Delete
v,
[8901] Fix | Delete
traditional,
[8902] Fix | Delete
add
[8903] Fix | Delete
);
[8904] Fix | Delete
}
[8905] Fix | Delete
} );
[8906] Fix | Delete
[8907] Fix | Delete
} else if ( !traditional && toType( obj ) === "object" ) {
[8908] Fix | Delete
[8909] Fix | Delete
// Serialize object item.
[8910] Fix | Delete
for ( name in obj ) {
[8911] Fix | Delete
buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
[8912] Fix | Delete
}
[8913] Fix | Delete
[8914] Fix | Delete
} else {
[8915] Fix | Delete
[8916] Fix | Delete
// Serialize scalar item.
[8917] Fix | Delete
add( prefix, obj );
[8918] Fix | Delete
}
[8919] Fix | Delete
}
[8920] Fix | Delete
[8921] Fix | Delete
// Serialize an array of form elements or a set of
[8922] Fix | Delete
// key/values into a query string
[8923] Fix | Delete
jQuery.param = function( a, traditional ) {
[8924] Fix | Delete
var prefix,
[8925] Fix | Delete
s = [],
[8926] Fix | Delete
add = function( key, valueOrFunction ) {
[8927] Fix | Delete
[8928] Fix | Delete
// If value is a function, invoke it and use its return value
[8929] Fix | Delete
var value = isFunction( valueOrFunction ) ?
[8930] Fix | Delete
valueOrFunction() :
[8931] Fix | Delete
valueOrFunction;
[8932] Fix | Delete
[8933] Fix | Delete
s[ s.length ] = encodeURIComponent( key ) + "=" +
[8934] Fix | Delete
encodeURIComponent( value == null ? "" : value );
[8935] Fix | Delete
};
[8936] Fix | Delete
[8937] Fix | Delete
if ( a == null ) {
[8938] Fix | Delete
return "";
[8939] Fix | Delete
}
[8940] Fix | Delete
[8941] Fix | Delete
// If an array was passed in, assume that it is an array of form elements.
[8942] Fix | Delete
if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
[8943] Fix | Delete
[8944] Fix | Delete
// Serialize the form elements
[8945] Fix | Delete
jQuery.each( a, function() {
[8946] Fix | Delete
add( this.name, this.value );
[8947] Fix | Delete
} );
[8948] Fix | Delete
[8949] Fix | Delete
} else {
[8950] Fix | Delete
[8951] Fix | Delete
// If traditional, encode the "old" way (the way 1.3.2 or older
[8952] Fix | Delete
// did it), otherwise encode params recursively.
[8953] Fix | Delete
for ( prefix in a ) {
[8954] Fix | Delete
buildParams( prefix, a[ prefix ], traditional, add );
[8955] Fix | Delete
}
[8956] Fix | Delete
}
[8957] Fix | Delete
[8958] Fix | Delete
// Return the resulting serialization
[8959] Fix | Delete
return s.join( "&" );
[8960] Fix | Delete
};
[8961] Fix | Delete
[8962] Fix | Delete
jQuery.fn.extend( {
[8963] Fix | Delete
serialize: function() {
[8964] Fix | Delete
return jQuery.param( this.serializeArray() );
[8965] Fix | Delete
},
[8966] Fix | Delete
serializeArray: function() {
[8967] Fix | Delete
return this.map( function() {
[8968] Fix | Delete
[8969] Fix | Delete
// Can add propHook for "elements" to filter or add form elements
[8970] Fix | Delete
var elements = jQuery.prop( this, "elements" );
[8971] Fix | Delete
return elements ? jQuery.makeArray( elements ) : this;
[8972] Fix | Delete
} )
[8973] Fix | Delete
.filter( function() {
[8974] Fix | Delete
var type = this.type;
[8975] Fix | Delete
[8976] Fix | Delete
// Use .is( ":disabled" ) so that fieldset[disabled] works
[8977] Fix | Delete
return this.name && !jQuery( this ).is( ":disabled" ) &&
[8978] Fix | Delete
rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
[8979] Fix | Delete
( this.checked || !rcheckableType.test( type ) );
[8980] Fix | Delete
} )
[8981] Fix | Delete
.map( function( _i, elem ) {
[8982] Fix | Delete
var val = jQuery( this ).val();
[8983] Fix | Delete
[8984] Fix | Delete
if ( val == null ) {
[8985] Fix | Delete
return null;
[8986] Fix | Delete
}
[8987] Fix | Delete
[8988] Fix | Delete
if ( Array.isArray( val ) ) {
[8989] Fix | Delete
return jQuery.map( val, function( val ) {
[8990] Fix | Delete
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
[8991] Fix | Delete
} );
[8992] Fix | Delete
}
[8993] Fix | Delete
[8994] Fix | Delete
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
[8995] Fix | Delete
} ).get();
[8996] Fix | Delete
}
[8997] Fix | Delete
} );
[8998] Fix | Delete
[8999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function