Edit File by line
/home/barbar84/www/wp-inclu.../js/jquery
File: jquery.js
var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,
[6500] Fix | Delete
reliableTrDimensionsVal, reliableMarginLeftVal,
[6501] Fix | Delete
container = document.createElement( "div" ),
[6502] Fix | Delete
div = document.createElement( "div" );
[6503] Fix | Delete
[6504] Fix | Delete
// Finish early in limited (non-browser) environments
[6505] Fix | Delete
if ( !div.style ) {
[6506] Fix | Delete
return;
[6507] Fix | Delete
}
[6508] Fix | Delete
[6509] Fix | Delete
// Support: IE <=9 - 11 only
[6510] Fix | Delete
// Style of cloned element affects source element cloned (#8908)
[6511] Fix | Delete
div.style.backgroundClip = "content-box";
[6512] Fix | Delete
div.cloneNode( true ).style.backgroundClip = "";
[6513] Fix | Delete
support.clearCloneStyle = div.style.backgroundClip === "content-box";
[6514] Fix | Delete
[6515] Fix | Delete
jQuery.extend( support, {
[6516] Fix | Delete
boxSizingReliable: function() {
[6517] Fix | Delete
computeStyleTests();
[6518] Fix | Delete
return boxSizingReliableVal;
[6519] Fix | Delete
},
[6520] Fix | Delete
pixelBoxStyles: function() {
[6521] Fix | Delete
computeStyleTests();
[6522] Fix | Delete
return pixelBoxStylesVal;
[6523] Fix | Delete
},
[6524] Fix | Delete
pixelPosition: function() {
[6525] Fix | Delete
computeStyleTests();
[6526] Fix | Delete
return pixelPositionVal;
[6527] Fix | Delete
},
[6528] Fix | Delete
reliableMarginLeft: function() {
[6529] Fix | Delete
computeStyleTests();
[6530] Fix | Delete
return reliableMarginLeftVal;
[6531] Fix | Delete
},
[6532] Fix | Delete
scrollboxSize: function() {
[6533] Fix | Delete
computeStyleTests();
[6534] Fix | Delete
return scrollboxSizeVal;
[6535] Fix | Delete
},
[6536] Fix | Delete
[6537] Fix | Delete
// Support: IE 9 - 11+, Edge 15 - 18+
[6538] Fix | Delete
// IE/Edge misreport `getComputedStyle` of table rows with width/height
[6539] Fix | Delete
// set in CSS while `offset*` properties report correct values.
[6540] Fix | Delete
// Behavior in IE 9 is more subtle than in newer versions & it passes
[6541] Fix | Delete
// some versions of this test; make sure not to make it pass there!
[6542] Fix | Delete
reliableTrDimensions: function() {
[6543] Fix | Delete
var table, tr, trChild, trStyle;
[6544] Fix | Delete
if ( reliableTrDimensionsVal == null ) {
[6545] Fix | Delete
table = document.createElement( "table" );
[6546] Fix | Delete
tr = document.createElement( "tr" );
[6547] Fix | Delete
trChild = document.createElement( "div" );
[6548] Fix | Delete
[6549] Fix | Delete
table.style.cssText = "position:absolute;left:-11111px";
[6550] Fix | Delete
tr.style.height = "1px";
[6551] Fix | Delete
trChild.style.height = "9px";
[6552] Fix | Delete
[6553] Fix | Delete
documentElement
[6554] Fix | Delete
.appendChild( table )
[6555] Fix | Delete
.appendChild( tr )
[6556] Fix | Delete
.appendChild( trChild );
[6557] Fix | Delete
[6558] Fix | Delete
trStyle = window.getComputedStyle( tr );
[6559] Fix | Delete
reliableTrDimensionsVal = parseInt( trStyle.height ) > 3;
[6560] Fix | Delete
[6561] Fix | Delete
documentElement.removeChild( table );
[6562] Fix | Delete
}
[6563] Fix | Delete
return reliableTrDimensionsVal;
[6564] Fix | Delete
}
[6565] Fix | Delete
} );
[6566] Fix | Delete
} )();
[6567] Fix | Delete
[6568] Fix | Delete
[6569] Fix | Delete
function curCSS( elem, name, computed ) {
[6570] Fix | Delete
var width, minWidth, maxWidth, ret,
[6571] Fix | Delete
[6572] Fix | Delete
// Support: Firefox 51+
[6573] Fix | Delete
// Retrieving style before computed somehow
[6574] Fix | Delete
// fixes an issue with getting wrong values
[6575] Fix | Delete
// on detached elements
[6576] Fix | Delete
style = elem.style;
[6577] Fix | Delete
[6578] Fix | Delete
computed = computed || getStyles( elem );
[6579] Fix | Delete
[6580] Fix | Delete
// getPropertyValue is needed for:
[6581] Fix | Delete
// .css('filter') (IE 9 only, #12537)
[6582] Fix | Delete
// .css('--customProperty) (#3144)
[6583] Fix | Delete
if ( computed ) {
[6584] Fix | Delete
ret = computed.getPropertyValue( name ) || computed[ name ];
[6585] Fix | Delete
[6586] Fix | Delete
if ( ret === "" && !isAttached( elem ) ) {
[6587] Fix | Delete
ret = jQuery.style( elem, name );
[6588] Fix | Delete
}
[6589] Fix | Delete
[6590] Fix | Delete
// A tribute to the "awesome hack by Dean Edwards"
[6591] Fix | Delete
// Android Browser returns percentage for some values,
[6592] Fix | Delete
// but width seems to be reliably pixels.
[6593] Fix | Delete
// This is against the CSSOM draft spec:
[6594] Fix | Delete
// https://drafts.csswg.org/cssom/#resolved-values
[6595] Fix | Delete
if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {
[6596] Fix | Delete
[6597] Fix | Delete
// Remember the original values
[6598] Fix | Delete
width = style.width;
[6599] Fix | Delete
minWidth = style.minWidth;
[6600] Fix | Delete
maxWidth = style.maxWidth;
[6601] Fix | Delete
[6602] Fix | Delete
// Put in the new values to get a computed value out
[6603] Fix | Delete
style.minWidth = style.maxWidth = style.width = ret;
[6604] Fix | Delete
ret = computed.width;
[6605] Fix | Delete
[6606] Fix | Delete
// Revert the changed values
[6607] Fix | Delete
style.width = width;
[6608] Fix | Delete
style.minWidth = minWidth;
[6609] Fix | Delete
style.maxWidth = maxWidth;
[6610] Fix | Delete
}
[6611] Fix | Delete
}
[6612] Fix | Delete
[6613] Fix | Delete
return ret !== undefined ?
[6614] Fix | Delete
[6615] Fix | Delete
// Support: IE <=9 - 11 only
[6616] Fix | Delete
// IE returns zIndex value as an integer.
[6617] Fix | Delete
ret + "" :
[6618] Fix | Delete
ret;
[6619] Fix | Delete
}
[6620] Fix | Delete
[6621] Fix | Delete
[6622] Fix | Delete
function addGetHookIf( conditionFn, hookFn ) {
[6623] Fix | Delete
[6624] Fix | Delete
// Define the hook, we'll check on the first run if it's really needed.
[6625] Fix | Delete
return {
[6626] Fix | Delete
get: function() {
[6627] Fix | Delete
if ( conditionFn() ) {
[6628] Fix | Delete
[6629] Fix | Delete
// Hook not needed (or it's not possible to use it due
[6630] Fix | Delete
// to missing dependency), remove it.
[6631] Fix | Delete
delete this.get;
[6632] Fix | Delete
return;
[6633] Fix | Delete
}
[6634] Fix | Delete
[6635] Fix | Delete
// Hook needed; redefine it so that the support test is not executed again.
[6636] Fix | Delete
return ( this.get = hookFn ).apply( this, arguments );
[6637] Fix | Delete
}
[6638] Fix | Delete
};
[6639] Fix | Delete
}
[6640] Fix | Delete
[6641] Fix | Delete
[6642] Fix | Delete
var cssPrefixes = [ "Webkit", "Moz", "ms" ],
[6643] Fix | Delete
emptyStyle = document.createElement( "div" ).style,
[6644] Fix | Delete
vendorProps = {};
[6645] Fix | Delete
[6646] Fix | Delete
// Return a vendor-prefixed property or undefined
[6647] Fix | Delete
function vendorPropName( name ) {
[6648] Fix | Delete
[6649] Fix | Delete
// Check for vendor prefixed names
[6650] Fix | Delete
var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
[6651] Fix | Delete
i = cssPrefixes.length;
[6652] Fix | Delete
[6653] Fix | Delete
while ( i-- ) {
[6654] Fix | Delete
name = cssPrefixes[ i ] + capName;
[6655] Fix | Delete
if ( name in emptyStyle ) {
[6656] Fix | Delete
return name;
[6657] Fix | Delete
}
[6658] Fix | Delete
}
[6659] Fix | Delete
}
[6660] Fix | Delete
[6661] Fix | Delete
// Return a potentially-mapped jQuery.cssProps or vendor prefixed property
[6662] Fix | Delete
function finalPropName( name ) {
[6663] Fix | Delete
var final = jQuery.cssProps[ name ] || vendorProps[ name ];
[6664] Fix | Delete
[6665] Fix | Delete
if ( final ) {
[6666] Fix | Delete
return final;
[6667] Fix | Delete
}
[6668] Fix | Delete
if ( name in emptyStyle ) {
[6669] Fix | Delete
return name;
[6670] Fix | Delete
}
[6671] Fix | Delete
return vendorProps[ name ] = vendorPropName( name ) || name;
[6672] Fix | Delete
}
[6673] Fix | Delete
[6674] Fix | Delete
[6675] Fix | Delete
var
[6676] Fix | Delete
[6677] Fix | Delete
// Swappable if display is none or starts with table
[6678] Fix | Delete
// except "table", "table-cell", or "table-caption"
[6679] Fix | Delete
// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
[6680] Fix | Delete
rdisplayswap = /^(none|table(?!-c[ea]).+)/,
[6681] Fix | Delete
rcustomProp = /^--/,
[6682] Fix | Delete
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
[6683] Fix | Delete
cssNormalTransform = {
[6684] Fix | Delete
letterSpacing: "0",
[6685] Fix | Delete
fontWeight: "400"
[6686] Fix | Delete
};
[6687] Fix | Delete
[6688] Fix | Delete
function setPositiveNumber( _elem, value, subtract ) {
[6689] Fix | Delete
[6690] Fix | Delete
// Any relative (+/-) values have already been
[6691] Fix | Delete
// normalized at this point
[6692] Fix | Delete
var matches = rcssNum.exec( value );
[6693] Fix | Delete
return matches ?
[6694] Fix | Delete
[6695] Fix | Delete
// Guard against undefined "subtract", e.g., when used as in cssHooks
[6696] Fix | Delete
Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
[6697] Fix | Delete
value;
[6698] Fix | Delete
}
[6699] Fix | Delete
[6700] Fix | Delete
function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
[6701] Fix | Delete
var i = dimension === "width" ? 1 : 0,
[6702] Fix | Delete
extra = 0,
[6703] Fix | Delete
delta = 0;
[6704] Fix | Delete
[6705] Fix | Delete
// Adjustment may not be necessary
[6706] Fix | Delete
if ( box === ( isBorderBox ? "border" : "content" ) ) {
[6707] Fix | Delete
return 0;
[6708] Fix | Delete
}
[6709] Fix | Delete
[6710] Fix | Delete
for ( ; i < 4; i += 2 ) {
[6711] Fix | Delete
[6712] Fix | Delete
// Both box models exclude margin
[6713] Fix | Delete
if ( box === "margin" ) {
[6714] Fix | Delete
delta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
[6715] Fix | Delete
}
[6716] Fix | Delete
[6717] Fix | Delete
// If we get here with a content-box, we're seeking "padding" or "border" or "margin"
[6718] Fix | Delete
if ( !isBorderBox ) {
[6719] Fix | Delete
[6720] Fix | Delete
// Add padding
[6721] Fix | Delete
delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
[6722] Fix | Delete
[6723] Fix | Delete
// For "border" or "margin", add border
[6724] Fix | Delete
if ( box !== "padding" ) {
[6725] Fix | Delete
delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
[6726] Fix | Delete
[6727] Fix | Delete
// But still keep track of it otherwise
[6728] Fix | Delete
} else {
[6729] Fix | Delete
extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
[6730] Fix | Delete
}
[6731] Fix | Delete
[6732] Fix | Delete
// If we get here with a border-box (content + padding + border), we're seeking "content" or
[6733] Fix | Delete
// "padding" or "margin"
[6734] Fix | Delete
} else {
[6735] Fix | Delete
[6736] Fix | Delete
// For "content", subtract padding
[6737] Fix | Delete
if ( box === "content" ) {
[6738] Fix | Delete
delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
[6739] Fix | Delete
}
[6740] Fix | Delete
[6741] Fix | Delete
// For "content" or "padding", subtract border
[6742] Fix | Delete
if ( box !== "margin" ) {
[6743] Fix | Delete
delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
[6744] Fix | Delete
}
[6745] Fix | Delete
}
[6746] Fix | Delete
}
[6747] Fix | Delete
[6748] Fix | Delete
// Account for positive content-box scroll gutter when requested by providing computedVal
[6749] Fix | Delete
if ( !isBorderBox && computedVal >= 0 ) {
[6750] Fix | Delete
[6751] Fix | Delete
// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
[6752] Fix | Delete
// Assuming integer scroll gutter, subtract the rest and round down
[6753] Fix | Delete
delta += Math.max( 0, Math.ceil(
[6754] Fix | Delete
elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
[6755] Fix | Delete
computedVal -
[6756] Fix | Delete
delta -
[6757] Fix | Delete
extra -
[6758] Fix | Delete
0.5
[6759] Fix | Delete
[6760] Fix | Delete
// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
[6761] Fix | Delete
// Use an explicit zero to avoid NaN (gh-3964)
[6762] Fix | Delete
) ) || 0;
[6763] Fix | Delete
}
[6764] Fix | Delete
[6765] Fix | Delete
return delta;
[6766] Fix | Delete
}
[6767] Fix | Delete
[6768] Fix | Delete
function getWidthOrHeight( elem, dimension, extra ) {
[6769] Fix | Delete
[6770] Fix | Delete
// Start with computed style
[6771] Fix | Delete
var styles = getStyles( elem ),
[6772] Fix | Delete
[6773] Fix | Delete
// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
[6774] Fix | Delete
// Fake content-box until we know it's needed to know the true value.
[6775] Fix | Delete
boxSizingNeeded = !support.boxSizingReliable() || extra,
[6776] Fix | Delete
isBorderBox = boxSizingNeeded &&
[6777] Fix | Delete
jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
[6778] Fix | Delete
valueIsBorderBox = isBorderBox,
[6779] Fix | Delete
[6780] Fix | Delete
val = curCSS( elem, dimension, styles ),
[6781] Fix | Delete
offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );
[6782] Fix | Delete
[6783] Fix | Delete
// Support: Firefox <=54
[6784] Fix | Delete
// Return a confounding non-pixel value or feign ignorance, as appropriate.
[6785] Fix | Delete
if ( rnumnonpx.test( val ) ) {
[6786] Fix | Delete
if ( !extra ) {
[6787] Fix | Delete
return val;
[6788] Fix | Delete
}
[6789] Fix | Delete
val = "auto";
[6790] Fix | Delete
}
[6791] Fix | Delete
[6792] Fix | Delete
[6793] Fix | Delete
// Support: IE 9 - 11 only
[6794] Fix | Delete
// Use offsetWidth/offsetHeight for when box sizing is unreliable.
[6795] Fix | Delete
// In those cases, the computed value can be trusted to be border-box.
[6796] Fix | Delete
if ( ( !support.boxSizingReliable() && isBorderBox ||
[6797] Fix | Delete
[6798] Fix | Delete
// Support: IE 10 - 11+, Edge 15 - 18+
[6799] Fix | Delete
// IE/Edge misreport `getComputedStyle` of table rows with width/height
[6800] Fix | Delete
// set in CSS while `offset*` properties report correct values.
[6801] Fix | Delete
// Interestingly, in some cases IE 9 doesn't suffer from this issue.
[6802] Fix | Delete
!support.reliableTrDimensions() && nodeName( elem, "tr" ) ||
[6803] Fix | Delete
[6804] Fix | Delete
// Fall back to offsetWidth/offsetHeight when value is "auto"
[6805] Fix | Delete
// This happens for inline elements with no explicit setting (gh-3571)
[6806] Fix | Delete
val === "auto" ||
[6807] Fix | Delete
[6808] Fix | Delete
// Support: Android <=4.1 - 4.3 only
[6809] Fix | Delete
// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
[6810] Fix | Delete
!parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) &&
[6811] Fix | Delete
[6812] Fix | Delete
// Make sure the element is visible & connected
[6813] Fix | Delete
elem.getClientRects().length ) {
[6814] Fix | Delete
[6815] Fix | Delete
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
[6816] Fix | Delete
[6817] Fix | Delete
// Where available, offsetWidth/offsetHeight approximate border box dimensions.
[6818] Fix | Delete
// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the
[6819] Fix | Delete
// retrieved value as a content box dimension.
[6820] Fix | Delete
valueIsBorderBox = offsetProp in elem;
[6821] Fix | Delete
if ( valueIsBorderBox ) {
[6822] Fix | Delete
val = elem[ offsetProp ];
[6823] Fix | Delete
}
[6824] Fix | Delete
}
[6825] Fix | Delete
[6826] Fix | Delete
// Normalize "" and auto
[6827] Fix | Delete
val = parseFloat( val ) || 0;
[6828] Fix | Delete
[6829] Fix | Delete
// Adjust for the element's box model
[6830] Fix | Delete
return ( val +
[6831] Fix | Delete
boxModelAdjustment(
[6832] Fix | Delete
elem,
[6833] Fix | Delete
dimension,
[6834] Fix | Delete
extra || ( isBorderBox ? "border" : "content" ),
[6835] Fix | Delete
valueIsBorderBox,
[6836] Fix | Delete
styles,
[6837] Fix | Delete
[6838] Fix | Delete
// Provide the current computed size to request scroll gutter calculation (gh-3589)
[6839] Fix | Delete
val
[6840] Fix | Delete
)
[6841] Fix | Delete
) + "px";
[6842] Fix | Delete
}
[6843] Fix | Delete
[6844] Fix | Delete
jQuery.extend( {
[6845] Fix | Delete
[6846] Fix | Delete
// Add in style property hooks for overriding the default
[6847] Fix | Delete
// behavior of getting and setting a style property
[6848] Fix | Delete
cssHooks: {
[6849] Fix | Delete
opacity: {
[6850] Fix | Delete
get: function( elem, computed ) {
[6851] Fix | Delete
if ( computed ) {
[6852] Fix | Delete
[6853] Fix | Delete
// We should always get a number back from opacity
[6854] Fix | Delete
var ret = curCSS( elem, "opacity" );
[6855] Fix | Delete
return ret === "" ? "1" : ret;
[6856] Fix | Delete
}
[6857] Fix | Delete
}
[6858] Fix | Delete
}
[6859] Fix | Delete
},
[6860] Fix | Delete
[6861] Fix | Delete
// Don't automatically add "px" to these possibly-unitless properties
[6862] Fix | Delete
cssNumber: {
[6863] Fix | Delete
"animationIterationCount": true,
[6864] Fix | Delete
"columnCount": true,
[6865] Fix | Delete
"fillOpacity": true,
[6866] Fix | Delete
"flexGrow": true,
[6867] Fix | Delete
"flexShrink": true,
[6868] Fix | Delete
"fontWeight": true,
[6869] Fix | Delete
"gridArea": true,
[6870] Fix | Delete
"gridColumn": true,
[6871] Fix | Delete
"gridColumnEnd": true,
[6872] Fix | Delete
"gridColumnStart": true,
[6873] Fix | Delete
"gridRow": true,
[6874] Fix | Delete
"gridRowEnd": true,
[6875] Fix | Delete
"gridRowStart": true,
[6876] Fix | Delete
"lineHeight": true,
[6877] Fix | Delete
"opacity": true,
[6878] Fix | Delete
"order": true,
[6879] Fix | Delete
"orphans": true,
[6880] Fix | Delete
"widows": true,
[6881] Fix | Delete
"zIndex": true,
[6882] Fix | Delete
"zoom": true
[6883] Fix | Delete
},
[6884] Fix | Delete
[6885] Fix | Delete
// Add in properties whose names you wish to fix before
[6886] Fix | Delete
// setting or getting the value
[6887] Fix | Delete
cssProps: {},
[6888] Fix | Delete
[6889] Fix | Delete
// Get and set the style property on a DOM Node
[6890] Fix | Delete
style: function( elem, name, value, extra ) {
[6891] Fix | Delete
[6892] Fix | Delete
// Don't set styles on text and comment nodes
[6893] Fix | Delete
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
[6894] Fix | Delete
return;
[6895] Fix | Delete
}
[6896] Fix | Delete
[6897] Fix | Delete
// Make sure that we're working with the right name
[6898] Fix | Delete
var ret, type, hooks,
[6899] Fix | Delete
origName = camelCase( name ),
[6900] Fix | Delete
isCustomProp = rcustomProp.test( name ),
[6901] Fix | Delete
style = elem.style;
[6902] Fix | Delete
[6903] Fix | Delete
// Make sure that we're working with the right name. We don't
[6904] Fix | Delete
// want to query the value if it is a CSS custom property
[6905] Fix | Delete
// since they are user-defined.
[6906] Fix | Delete
if ( !isCustomProp ) {
[6907] Fix | Delete
name = finalPropName( origName );
[6908] Fix | Delete
}
[6909] Fix | Delete
[6910] Fix | Delete
// Gets hook for the prefixed version, then unprefixed version
[6911] Fix | Delete
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
[6912] Fix | Delete
[6913] Fix | Delete
// Check if we're setting a value
[6914] Fix | Delete
if ( value !== undefined ) {
[6915] Fix | Delete
type = typeof value;
[6916] Fix | Delete
[6917] Fix | Delete
// Convert "+=" or "-=" to relative numbers (#7345)
[6918] Fix | Delete
if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
[6919] Fix | Delete
value = adjustCSS( elem, name, ret );
[6920] Fix | Delete
[6921] Fix | Delete
// Fixes bug #9237
[6922] Fix | Delete
type = "number";
[6923] Fix | Delete
}
[6924] Fix | Delete
[6925] Fix | Delete
// Make sure that null and NaN values aren't set (#7116)
[6926] Fix | Delete
if ( value == null || value !== value ) {
[6927] Fix | Delete
return;
[6928] Fix | Delete
}
[6929] Fix | Delete
[6930] Fix | Delete
// If a number was passed in, add the unit (except for certain CSS properties)
[6931] Fix | Delete
// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append
[6932] Fix | Delete
// "px" to a few hardcoded values.
[6933] Fix | Delete
if ( type === "number" && !isCustomProp ) {
[6934] Fix | Delete
value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
[6935] Fix | Delete
}
[6936] Fix | Delete
[6937] Fix | Delete
// background-* props affect original clone's values
[6938] Fix | Delete
if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
[6939] Fix | Delete
style[ name ] = "inherit";
[6940] Fix | Delete
}
[6941] Fix | Delete
[6942] Fix | Delete
// If a hook was provided, use that value, otherwise just set the specified value
[6943] Fix | Delete
if ( !hooks || !( "set" in hooks ) ||
[6944] Fix | Delete
( value = hooks.set( elem, value, extra ) ) !== undefined ) {
[6945] Fix | Delete
[6946] Fix | Delete
if ( isCustomProp ) {
[6947] Fix | Delete
style.setProperty( name, value );
[6948] Fix | Delete
} else {
[6949] Fix | Delete
style[ name ] = value;
[6950] Fix | Delete
}
[6951] Fix | Delete
}
[6952] Fix | Delete
[6953] Fix | Delete
} else {
[6954] Fix | Delete
[6955] Fix | Delete
// If a hook was provided get the non-computed value from there
[6956] Fix | Delete
if ( hooks && "get" in hooks &&
[6957] Fix | Delete
( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
[6958] Fix | Delete
[6959] Fix | Delete
return ret;
[6960] Fix | Delete
}
[6961] Fix | Delete
[6962] Fix | Delete
// Otherwise just get the value from the style object
[6963] Fix | Delete
return style[ name ];
[6964] Fix | Delete
}
[6965] Fix | Delete
},
[6966] Fix | Delete
[6967] Fix | Delete
css: function( elem, name, extra, styles ) {
[6968] Fix | Delete
var val, num, hooks,
[6969] Fix | Delete
origName = camelCase( name ),
[6970] Fix | Delete
isCustomProp = rcustomProp.test( name );
[6971] Fix | Delete
[6972] Fix | Delete
// Make sure that we're working with the right name. We don't
[6973] Fix | Delete
// want to modify the value if it is a CSS custom property
[6974] Fix | Delete
// since they are user-defined.
[6975] Fix | Delete
if ( !isCustomProp ) {
[6976] Fix | Delete
name = finalPropName( origName );
[6977] Fix | Delete
}
[6978] Fix | Delete
[6979] Fix | Delete
// Try prefixed name followed by the unprefixed name
[6980] Fix | Delete
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
[6981] Fix | Delete
[6982] Fix | Delete
// If a hook was provided get the computed value from there
[6983] Fix | Delete
if ( hooks && "get" in hooks ) {
[6984] Fix | Delete
val = hooks.get( elem, true, extra );
[6985] Fix | Delete
}
[6986] Fix | Delete
[6987] Fix | Delete
// Otherwise, if a way to get the computed value exists, use that
[6988] Fix | Delete
if ( val === undefined ) {
[6989] Fix | Delete
val = curCSS( elem, name, styles );
[6990] Fix | Delete
}
[6991] Fix | Delete
[6992] Fix | Delete
// Convert "normal" to computed value
[6993] Fix | Delete
if ( val === "normal" && name in cssNormalTransform ) {
[6994] Fix | Delete
val = cssNormalTransform[ name ];
[6995] Fix | Delete
}
[6996] Fix | Delete
[6997] Fix | Delete
// Make numeric if forced or a qualifier was provided and val looks numeric
[6998] Fix | Delete
if ( extra === "" || extra ) {
[6999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function