jquery-source 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/jquery-source/version.rb +1 -1
- data/vendor/assets/javascripts/jquery.js +179 -108
- metadata +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* jQuery JavaScript Library v1.6
|
2
|
+
* jQuery JavaScript Library v1.6.1
|
3
3
|
* http://jquery.com/
|
4
4
|
*
|
5
5
|
* Copyright 2011, John Resig
|
@@ -11,7 +11,7 @@
|
|
11
11
|
* Copyright 2011, The Dojo Foundation
|
12
12
|
* Released under the MIT, BSD, and GPL Licenses.
|
13
13
|
*
|
14
|
-
* Date:
|
14
|
+
* Date: Thu May 12 15:04:36 2011 -0400
|
15
15
|
*/
|
16
16
|
(function( window, undefined ) {
|
17
17
|
|
@@ -204,7 +204,7 @@ jQuery.fn = jQuery.prototype = {
|
|
204
204
|
selector: "",
|
205
205
|
|
206
206
|
// The current version of jQuery being used
|
207
|
-
jquery: "1.6",
|
207
|
+
jquery: "1.6.1",
|
208
208
|
|
209
209
|
// The default length of a jQuery object is 0
|
210
210
|
length: 0,
|
@@ -1055,7 +1055,7 @@ jQuery.extend({
|
|
1055
1055
|
if ( jQuery.isFunction( fn ) ) {
|
1056
1056
|
deferred[ handler ](function() {
|
1057
1057
|
returned = fn.apply( this, arguments );
|
1058
|
-
if ( jQuery.isFunction( returned.promise ) ) {
|
1058
|
+
if ( returned && jQuery.isFunction( returned.promise ) ) {
|
1059
1059
|
returned.promise().then( newDefer.resolve, newDefer.reject );
|
1060
1060
|
} else {
|
1061
1061
|
newDefer[ action ]( returned );
|
@@ -1137,6 +1137,7 @@ jQuery.extend({
|
|
1137
1137
|
jQuery.support = (function() {
|
1138
1138
|
|
1139
1139
|
var div = document.createElement( "div" ),
|
1140
|
+
documentElement = document.documentElement,
|
1140
1141
|
all,
|
1141
1142
|
a,
|
1142
1143
|
select,
|
@@ -1284,7 +1285,7 @@ jQuery.support = (function() {
|
|
1284
1285
|
body.style[ i ] = bodyStyle[ i ];
|
1285
1286
|
}
|
1286
1287
|
body.appendChild( div );
|
1287
|
-
|
1288
|
+
documentElement.insertBefore( body, documentElement.firstChild );
|
1288
1289
|
|
1289
1290
|
// Check if a disconnected checkbox will retain its checked
|
1290
1291
|
// value of true after appended to the DOM (IE6/7)
|
@@ -1339,12 +1340,12 @@ jQuery.support = (function() {
|
|
1339
1340
|
marginDiv.style.marginRight = "0";
|
1340
1341
|
div.appendChild( marginDiv );
|
1341
1342
|
support.reliableMarginRight =
|
1342
|
-
( parseInt( document.defaultView.getComputedStyle( marginDiv, null ).marginRight, 10 ) || 0 ) === 0;
|
1343
|
+
( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
|
1343
1344
|
}
|
1344
1345
|
|
1345
1346
|
// Remove the body element we added
|
1346
1347
|
body.innerHTML = "";
|
1347
|
-
|
1348
|
+
documentElement.removeChild( body );
|
1348
1349
|
|
1349
1350
|
// Technique from Juriy Zaytsev
|
1350
1351
|
// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
|
@@ -1475,7 +1476,7 @@ jQuery.extend({
|
|
1475
1476
|
}
|
1476
1477
|
|
1477
1478
|
if ( data !== undefined ) {
|
1478
|
-
thisCache[ name ] = data;
|
1479
|
+
thisCache[ jQuery.camelCase( name ) ] = data;
|
1479
1480
|
}
|
1480
1481
|
|
1481
1482
|
// TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should
|
@@ -1485,7 +1486,7 @@ jQuery.extend({
|
|
1485
1486
|
return thisCache[ internalKey ] && thisCache[ internalKey ].events;
|
1486
1487
|
}
|
1487
1488
|
|
1488
|
-
return getByName ? thisCache[ name ] : thisCache;
|
1489
|
+
return getByName ? thisCache[ jQuery.camelCase( name ) ] : thisCache;
|
1489
1490
|
},
|
1490
1491
|
|
1491
1492
|
removeData: function( elem, name, pvt /* Internal Use Only */ ) {
|
@@ -1661,7 +1662,7 @@ function dataAttr( elem, key, data ) {
|
|
1661
1662
|
// If nothing was found internally, try to fetch any
|
1662
1663
|
// data from the HTML5 data-* attribute
|
1663
1664
|
if ( data === undefined && elem.nodeType === 1 ) {
|
1664
|
-
name = "data-" + key.replace( rmultiDash, "$1-$2" ).toLowerCase();
|
1665
|
+
var name = "data-" + key.replace( rmultiDash, "$1-$2" ).toLowerCase();
|
1665
1666
|
|
1666
1667
|
data = elem.getAttribute( name );
|
1667
1668
|
|
@@ -1850,7 +1851,8 @@ jQuery.fn.extend({
|
|
1850
1851
|
count = 1,
|
1851
1852
|
deferDataKey = type + "defer",
|
1852
1853
|
queueDataKey = type + "queue",
|
1853
|
-
markDataKey = type + "mark"
|
1854
|
+
markDataKey = type + "mark",
|
1855
|
+
tmp;
|
1854
1856
|
function resolve() {
|
1855
1857
|
if ( !( --count ) ) {
|
1856
1858
|
defer.resolveWith( elements, [ elements ] );
|
@@ -1879,9 +1881,9 @@ var rclass = /[\n\t\r]/g,
|
|
1879
1881
|
rtype = /^(?:button|input)$/i,
|
1880
1882
|
rfocusable = /^(?:button|input|object|select|textarea)$/i,
|
1881
1883
|
rclickable = /^a(?:rea)?$/i,
|
1882
|
-
|
1884
|
+
rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
|
1883
1885
|
rinvalidChar = /\:/,
|
1884
|
-
formHook;
|
1886
|
+
formHook, boolHook;
|
1885
1887
|
|
1886
1888
|
jQuery.fn.extend({
|
1887
1889
|
attr: function( name, value ) {
|
@@ -1899,6 +1901,7 @@ jQuery.fn.extend({
|
|
1899
1901
|
},
|
1900
1902
|
|
1901
1903
|
removeProp: function( name ) {
|
1904
|
+
name = jQuery.propFix[ name ] || name;
|
1902
1905
|
return this.each(function() {
|
1903
1906
|
// try/catch handles cases where IE balks (such as removing a property on window)
|
1904
1907
|
try {
|
@@ -2072,7 +2075,7 @@ jQuery.fn.extend({
|
|
2072
2075
|
hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];
|
2073
2076
|
|
2074
2077
|
// If set returns undefined, fall back to normal setting
|
2075
|
-
if ( !hooks || ("set" in hooks
|
2078
|
+
if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
|
2076
2079
|
this.value = val;
|
2077
2080
|
}
|
2078
2081
|
});
|
@@ -2091,7 +2094,8 @@ jQuery.extend({
|
|
2091
2094
|
},
|
2092
2095
|
select: {
|
2093
2096
|
get: function( elem ) {
|
2094
|
-
var
|
2097
|
+
var value,
|
2098
|
+
index = elem.selectedIndex,
|
2095
2099
|
values = [],
|
2096
2100
|
options = elem.options,
|
2097
2101
|
one = elem.type === "select-one";
|
@@ -2158,8 +2162,7 @@ jQuery.extend({
|
|
2158
2162
|
|
2159
2163
|
attrFix: {
|
2160
2164
|
// Always normalize to ensure hook usage
|
2161
|
-
tabindex: "tabIndex"
|
2162
|
-
readonly: "readOnly"
|
2165
|
+
tabindex: "tabIndex"
|
2163
2166
|
},
|
2164
2167
|
|
2165
2168
|
attr: function( elem, name, value, pass ) {
|
@@ -2173,23 +2176,36 @@ jQuery.extend({
|
|
2173
2176
|
if ( pass && name in jQuery.attrFn ) {
|
2174
2177
|
return jQuery( elem )[ name ]( value );
|
2175
2178
|
}
|
2176
|
-
|
2179
|
+
|
2180
|
+
// Fallback to prop when attributes are not supported
|
2181
|
+
if ( !("getAttribute" in elem) ) {
|
2182
|
+
return jQuery.prop( elem, name, value );
|
2183
|
+
}
|
2184
|
+
|
2177
2185
|
var ret, hooks,
|
2178
2186
|
notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
|
2179
|
-
|
2187
|
+
|
2180
2188
|
// Normalize the name if needed
|
2181
2189
|
name = notxml && jQuery.attrFix[ name ] || name;
|
2182
2190
|
|
2183
|
-
|
2184
|
-
|
2185
|
-
|
2186
|
-
|
2187
|
-
|
2188
|
-
undefined )
|
2191
|
+
hooks = jQuery.attrHooks[ name ];
|
2192
|
+
|
2193
|
+
if ( !hooks ) {
|
2194
|
+
// Use boolHook for boolean attributes
|
2195
|
+
if ( rboolean.test( name ) &&
|
2196
|
+
(typeof value === "boolean" || value === undefined || value.toLowerCase() === name.toLowerCase()) ) {
|
2197
|
+
|
2198
|
+
hooks = boolHook;
|
2199
|
+
|
2200
|
+
// Use formHook for forms and if the name contains certain characters
|
2201
|
+
} else if ( formHook && (jQuery.nodeName( elem, "form" ) || rinvalidChar.test( name )) ) {
|
2202
|
+
hooks = formHook;
|
2203
|
+
}
|
2204
|
+
}
|
2189
2205
|
|
2190
2206
|
if ( value !== undefined ) {
|
2191
2207
|
|
2192
|
-
if ( value === null
|
2208
|
+
if ( value === null ) {
|
2193
2209
|
jQuery.removeAttr( elem, name );
|
2194
2210
|
return undefined;
|
2195
2211
|
|
@@ -2197,34 +2213,26 @@ jQuery.extend({
|
|
2197
2213
|
return ret;
|
2198
2214
|
|
2199
2215
|
} else {
|
2200
|
-
|
2201
|
-
// Set boolean attributes to the same name
|
2202
|
-
if ( value === true && !rspecial.test( name ) ) {
|
2203
|
-
value = name;
|
2204
|
-
}
|
2205
|
-
|
2206
2216
|
elem.setAttribute( name, "" + value );
|
2207
2217
|
return value;
|
2208
2218
|
}
|
2209
2219
|
|
2210
|
-
} else {
|
2211
|
-
|
2212
|
-
if ( hooks && "get" in hooks && notxml ) {
|
2213
|
-
return hooks.get( elem, name );
|
2220
|
+
} else if ( hooks && "get" in hooks && notxml ) {
|
2221
|
+
return hooks.get( elem, name );
|
2214
2222
|
|
2215
|
-
|
2223
|
+
} else {
|
2216
2224
|
|
2217
|
-
|
2225
|
+
ret = elem.getAttribute( name );
|
2218
2226
|
|
2219
|
-
|
2220
|
-
|
2221
|
-
|
2222
|
-
|
2223
|
-
}
|
2227
|
+
// Non-existent attributes return null, we normalize to undefined
|
2228
|
+
return ret === null ?
|
2229
|
+
undefined :
|
2230
|
+
ret;
|
2224
2231
|
}
|
2225
2232
|
},
|
2226
|
-
|
2233
|
+
|
2227
2234
|
removeAttr: function( elem, name ) {
|
2235
|
+
var propName;
|
2228
2236
|
if ( elem.nodeType === 1 ) {
|
2229
2237
|
name = jQuery.attrFix[ name ] || name;
|
2230
2238
|
|
@@ -2235,6 +2243,11 @@ jQuery.extend({
|
|
2235
2243
|
jQuery.attr( elem, name, "" );
|
2236
2244
|
elem.removeAttributeNode( elem.getAttributeNode( name ) );
|
2237
2245
|
}
|
2246
|
+
|
2247
|
+
// Set corresponding property to false for boolean attributes
|
2248
|
+
if ( rboolean.test( name ) && (propName = jQuery.propFix[ name ] || name) in elem ) {
|
2249
|
+
elem[ propName ] = false;
|
2250
|
+
}
|
2238
2251
|
}
|
2239
2252
|
},
|
2240
2253
|
|
@@ -2248,7 +2261,7 @@ jQuery.extend({
|
|
2248
2261
|
// Setting the type on a radio button after the value resets the value in IE6-9
|
2249
2262
|
// Reset value to it's default in case type is set after value
|
2250
2263
|
// This is for element creation
|
2251
|
-
var val = elem.
|
2264
|
+
var val = elem.value;
|
2252
2265
|
elem.setAttribute( "type", value );
|
2253
2266
|
if ( val ) {
|
2254
2267
|
elem.value = val;
|
@@ -2271,37 +2284,50 @@ jQuery.extend({
|
|
2271
2284
|
}
|
2272
2285
|
}
|
2273
2286
|
},
|
2274
|
-
|
2275
|
-
propFix: {
|
2287
|
+
|
2288
|
+
propFix: {
|
2289
|
+
tabindex: "tabIndex",
|
2290
|
+
readonly: "readOnly",
|
2291
|
+
"for": "htmlFor",
|
2292
|
+
"class": "className",
|
2293
|
+
maxlength: "maxLength",
|
2294
|
+
cellspacing: "cellSpacing",
|
2295
|
+
cellpadding: "cellPadding",
|
2296
|
+
rowspan: "rowSpan",
|
2297
|
+
colspan: "colSpan",
|
2298
|
+
usemap: "useMap",
|
2299
|
+
frameborder: "frameBorder",
|
2300
|
+
contenteditable: "contentEditable"
|
2301
|
+
},
|
2276
2302
|
|
2277
2303
|
prop: function( elem, name, value ) {
|
2278
2304
|
var nType = elem.nodeType;
|
2279
|
-
|
2305
|
+
|
2280
2306
|
// don't get/set properties on text, comment and attribute nodes
|
2281
2307
|
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
|
2282
2308
|
return undefined;
|
2283
2309
|
}
|
2284
|
-
|
2310
|
+
|
2285
2311
|
var ret, hooks,
|
2286
2312
|
notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
|
2287
|
-
|
2313
|
+
|
2288
2314
|
// Try to normalize/fix the name
|
2289
2315
|
name = notxml && jQuery.propFix[ name ] || name;
|
2290
2316
|
|
2291
2317
|
hooks = jQuery.propHooks[ name ];
|
2292
|
-
|
2318
|
+
|
2293
2319
|
if ( value !== undefined ) {
|
2294
2320
|
if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
|
2295
2321
|
return ret;
|
2296
|
-
|
2322
|
+
|
2297
2323
|
} else {
|
2298
2324
|
return (elem[ name ] = value);
|
2299
2325
|
}
|
2300
|
-
|
2326
|
+
|
2301
2327
|
} else {
|
2302
2328
|
if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== undefined ) {
|
2303
2329
|
return ret;
|
2304
|
-
|
2330
|
+
|
2305
2331
|
} else {
|
2306
2332
|
return elem[ name ];
|
2307
2333
|
}
|
@@ -2311,30 +2337,65 @@ jQuery.extend({
|
|
2311
2337
|
propHooks: {}
|
2312
2338
|
});
|
2313
2339
|
|
2340
|
+
// Hook for boolean attributes
|
2341
|
+
boolHook = {
|
2342
|
+
get: function( elem, name ) {
|
2343
|
+
// Align boolean attributes with corresponding properties
|
2344
|
+
return elem[ jQuery.propFix[ name ] || name ] ?
|
2345
|
+
name.toLowerCase() :
|
2346
|
+
undefined;
|
2347
|
+
},
|
2348
|
+
set: function( elem, value, name ) {
|
2349
|
+
var propName;
|
2350
|
+
if ( value === false ) {
|
2351
|
+
// Remove boolean attributes when set to false
|
2352
|
+
jQuery.removeAttr( elem, name );
|
2353
|
+
} else {
|
2354
|
+
// value is true since we know at this point it's type boolean and not false
|
2355
|
+
// Set boolean attributes to the same name and set the DOM property
|
2356
|
+
propName = jQuery.propFix[ name ] || name;
|
2357
|
+
if ( propName in elem ) {
|
2358
|
+
// Only set the IDL specifically if it already exists on the element
|
2359
|
+
elem[ propName ] = value;
|
2360
|
+
}
|
2361
|
+
|
2362
|
+
elem.setAttribute( name, name.toLowerCase() );
|
2363
|
+
}
|
2364
|
+
return name;
|
2365
|
+
}
|
2366
|
+
};
|
2367
|
+
|
2368
|
+
// Use the value property for back compat
|
2369
|
+
// Use the formHook for button elements in IE6/7 (#1954)
|
2370
|
+
jQuery.attrHooks.value = {
|
2371
|
+
get: function( elem, name ) {
|
2372
|
+
if ( formHook && jQuery.nodeName( elem, "button" ) ) {
|
2373
|
+
return formHook.get( elem, name );
|
2374
|
+
}
|
2375
|
+
return elem.value;
|
2376
|
+
},
|
2377
|
+
set: function( elem, value, name ) {
|
2378
|
+
if ( formHook && jQuery.nodeName( elem, "button" ) ) {
|
2379
|
+
return formHook.set( elem, value, name );
|
2380
|
+
}
|
2381
|
+
// Does not return so that setAttribute is also used
|
2382
|
+
elem.value = value;
|
2383
|
+
}
|
2384
|
+
};
|
2385
|
+
|
2314
2386
|
// IE6/7 do not support getting/setting some attributes with get/setAttribute
|
2315
2387
|
if ( !jQuery.support.getSetAttribute ) {
|
2316
|
-
|
2317
|
-
|
2318
|
-
|
2319
|
-
maxlength: "maxLength",
|
2320
|
-
cellspacing: "cellSpacing",
|
2321
|
-
cellpadding: "cellPadding",
|
2322
|
-
rowspan: "rowSpan",
|
2323
|
-
colspan: "colSpan",
|
2324
|
-
usemap: "useMap",
|
2325
|
-
frameborder: "frameBorder"
|
2326
|
-
});
|
2388
|
+
|
2389
|
+
// propFix is more comprehensive and contains all fixes
|
2390
|
+
jQuery.attrFix = jQuery.propFix;
|
2327
2391
|
|
2328
2392
|
// Use this for any attribute on a form in IE6/7
|
2329
|
-
formHook = jQuery.attrHooks.name = jQuery.
|
2393
|
+
formHook = jQuery.attrHooks.name = jQuery.valHooks.button = {
|
2330
2394
|
get: function( elem, name ) {
|
2331
2395
|
var ret;
|
2332
|
-
if ( name === "value" && !jQuery.nodeName( elem, "button" ) ) {
|
2333
|
-
return elem.getAttribute( name );
|
2334
|
-
}
|
2335
2396
|
ret = elem.getAttributeNode( name );
|
2336
|
-
// Return undefined if
|
2337
|
-
return ret && ret.
|
2397
|
+
// Return undefined if nodeValue is empty string
|
2398
|
+
return ret && ret.nodeValue !== "" ?
|
2338
2399
|
ret.nodeValue :
|
2339
2400
|
undefined;
|
2340
2401
|
},
|
@@ -3086,6 +3147,9 @@ var withinElement = function( event ) {
|
|
3086
3147
|
// Check if mouse(over|out) are still within the same parent element
|
3087
3148
|
var parent = event.relatedTarget;
|
3088
3149
|
|
3150
|
+
// set the correct event type
|
3151
|
+
event.type = event.data;
|
3152
|
+
|
3089
3153
|
// Firefox sometimes assigns relatedTarget a XUL element
|
3090
3154
|
// which we cannot access the parentNode property of
|
3091
3155
|
try {
|
@@ -3095,15 +3159,13 @@ var withinElement = function( event ) {
|
|
3095
3159
|
if ( parent && parent !== document && !parent.parentNode ) {
|
3096
3160
|
return;
|
3097
3161
|
}
|
3162
|
+
|
3098
3163
|
// Traverse up the tree
|
3099
3164
|
while ( parent && parent !== this ) {
|
3100
3165
|
parent = parent.parentNode;
|
3101
3166
|
}
|
3102
3167
|
|
3103
3168
|
if ( parent !== this ) {
|
3104
|
-
// set the correct event type
|
3105
|
-
event.type = event.data;
|
3106
|
-
|
3107
3169
|
// handle event if we actually just moused on to a non sub-element
|
3108
3170
|
jQuery.event.handle.apply( this, arguments );
|
3109
3171
|
}
|
@@ -4291,7 +4353,8 @@ var Expr = Sizzle.selectors = {
|
|
4291
4353
|
},
|
4292
4354
|
|
4293
4355
|
reset: function( elem ) {
|
4294
|
-
|
4356
|
+
var name = elem.nodeName.toLowerCase();
|
4357
|
+
return (name === "input" || name === "button") && "reset" === elem.type;
|
4295
4358
|
},
|
4296
4359
|
|
4297
4360
|
button: function( elem ) {
|
@@ -4557,6 +4620,16 @@ if ( document.documentElement.compareDocumentPosition ) {
|
|
4557
4620
|
|
4558
4621
|
} else {
|
4559
4622
|
sortOrder = function( a, b ) {
|
4623
|
+
// The nodes are identical, we can exit early
|
4624
|
+
if ( a === b ) {
|
4625
|
+
hasDuplicate = true;
|
4626
|
+
return 0;
|
4627
|
+
|
4628
|
+
// Fallback to using sourceIndex (in IE) if it's available on both nodes
|
4629
|
+
} else if ( a.sourceIndex && b.sourceIndex ) {
|
4630
|
+
return a.sourceIndex - b.sourceIndex;
|
4631
|
+
}
|
4632
|
+
|
4560
4633
|
var al, bl,
|
4561
4634
|
ap = [],
|
4562
4635
|
bp = [],
|
@@ -4564,13 +4637,8 @@ if ( document.documentElement.compareDocumentPosition ) {
|
|
4564
4637
|
bup = b.parentNode,
|
4565
4638
|
cur = aup;
|
4566
4639
|
|
4567
|
-
// The nodes are identical, we can exit early
|
4568
|
-
if ( a === b ) {
|
4569
|
-
hasDuplicate = true;
|
4570
|
-
return 0;
|
4571
|
-
|
4572
4640
|
// If the nodes are siblings (or identical) we can do a quick check
|
4573
|
-
|
4641
|
+
if ( aup === bup ) {
|
4574
4642
|
return siblingCheck( a, b );
|
4575
4643
|
|
4576
4644
|
// If no parents were found then the nodes are disconnected
|
@@ -5394,6 +5462,7 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
|
|
5394
5462
|
// checked="checked" or checked
|
5395
5463
|
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
|
5396
5464
|
rscriptType = /\/(java|ecma)script/i,
|
5465
|
+
rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
|
5397
5466
|
wrapMap = {
|
5398
5467
|
option: [ 1, "<select multiple='multiple'>", "</select>" ],
|
5399
5468
|
legend: [ 1, "<fieldset>", "</fieldset>" ],
|
@@ -5884,7 +5953,7 @@ jQuery.each({
|
|
5884
5953
|
function getAll( elem ) {
|
5885
5954
|
if ( "getElementsByTagName" in elem ) {
|
5886
5955
|
return elem.getElementsByTagName( "*" );
|
5887
|
-
|
5956
|
+
|
5888
5957
|
} else if ( "querySelectorAll" in elem ) {
|
5889
5958
|
return elem.querySelectorAll( "*" );
|
5890
5959
|
|
@@ -5966,7 +6035,7 @@ jQuery.extend({
|
|
5966
6035
|
context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
|
5967
6036
|
}
|
5968
6037
|
|
5969
|
-
var ret = [];
|
6038
|
+
var ret = [], j;
|
5970
6039
|
|
5971
6040
|
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
|
5972
6041
|
if ( typeof elem === "number" ) {
|
@@ -6012,7 +6081,7 @@ jQuery.extend({
|
|
6012
6081
|
div.childNodes :
|
6013
6082
|
[];
|
6014
6083
|
|
6015
|
-
for (
|
6084
|
+
for ( j = tbody.length - 1; j >= 0 ; --j ) {
|
6016
6085
|
if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
|
6017
6086
|
tbody[ j ].parentNode.removeChild( tbody[ j ] );
|
6018
6087
|
}
|
@@ -6033,8 +6102,8 @@ jQuery.extend({
|
|
6033
6102
|
var len;
|
6034
6103
|
if ( !jQuery.support.appendChecked ) {
|
6035
6104
|
if ( elem[0] && typeof (len = elem.length) === "number" ) {
|
6036
|
-
for (
|
6037
|
-
findInputs( elem[
|
6105
|
+
for ( j = 0; j < len; j++ ) {
|
6106
|
+
findInputs( elem[j] );
|
6038
6107
|
}
|
6039
6108
|
} else {
|
6040
6109
|
findInputs( elem );
|
@@ -6122,7 +6191,7 @@ function evalScript( i, elem ) {
|
|
6122
6191
|
dataType: "script"
|
6123
6192
|
});
|
6124
6193
|
} else {
|
6125
|
-
jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
|
6194
|
+
jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
|
6126
6195
|
}
|
6127
6196
|
|
6128
6197
|
if ( elem.parentNode ) {
|
@@ -7999,6 +8068,9 @@ jQuery.fn.extend({
|
|
7999
8068
|
return this.each( optall.complete, [ false ] );
|
8000
8069
|
}
|
8001
8070
|
|
8071
|
+
// Do not change referenced properties as per-property easing will be lost
|
8072
|
+
prop = jQuery.extend( {}, prop );
|
8073
|
+
|
8002
8074
|
return this[ optall.queue === false ? "each" : "queue" ](function() {
|
8003
8075
|
// XXX 'this' does not always have a nodeName when running the
|
8004
8076
|
// test suite
|
@@ -8007,7 +8079,7 @@ jQuery.fn.extend({
|
|
8007
8079
|
jQuery._mark( this );
|
8008
8080
|
}
|
8009
8081
|
|
8010
|
-
var opt = jQuery.extend({}, optall),
|
8082
|
+
var opt = jQuery.extend( {}, optall ),
|
8011
8083
|
isElement = this.nodeType === 1,
|
8012
8084
|
hidden = isElement && jQuery(this).is(":hidden"),
|
8013
8085
|
name, val, p,
|
@@ -8026,10 +8098,18 @@ jQuery.fn.extend({
|
|
8026
8098
|
delete prop[ p ];
|
8027
8099
|
}
|
8028
8100
|
|
8029
|
-
val = prop[name];
|
8101
|
+
val = prop[ name ];
|
8102
|
+
|
8103
|
+
// easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
|
8104
|
+
if ( jQuery.isArray( val ) ) {
|
8105
|
+
opt.animatedProperties[ name ] = val[ 1 ];
|
8106
|
+
val = prop[ name ] = val[ 0 ];
|
8107
|
+
} else {
|
8108
|
+
opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
|
8109
|
+
}
|
8030
8110
|
|
8031
8111
|
if ( val === "hide" && hidden || val === "show" && !hidden ) {
|
8032
|
-
return opt.complete.call(this);
|
8112
|
+
return opt.complete.call( this );
|
8033
8113
|
}
|
8034
8114
|
|
8035
8115
|
if ( isElement && ( name === "height" || name === "width" ) ) {
|
@@ -8048,7 +8128,7 @@ jQuery.fn.extend({
|
|
8048
8128
|
this.style.display = "inline-block";
|
8049
8129
|
|
8050
8130
|
} else {
|
8051
|
-
display = defaultDisplay(this.nodeName);
|
8131
|
+
display = defaultDisplay( this.nodeName );
|
8052
8132
|
|
8053
8133
|
// inline-level elements accept inline-block;
|
8054
8134
|
// block-level elements need to be inline with layout
|
@@ -8062,11 +8142,6 @@ jQuery.fn.extend({
|
|
8062
8142
|
}
|
8063
8143
|
}
|
8064
8144
|
}
|
8065
|
-
|
8066
|
-
// easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
|
8067
|
-
opt.animatedProperties[name] = jQuery.isArray( val ) ?
|
8068
|
-
val[1]:
|
8069
|
-
opt.specialEasing && opt.specialEasing[name] || opt.easing || 'swing';
|
8070
8145
|
}
|
8071
8146
|
|
8072
8147
|
if ( opt.overflow != null ) {
|
@@ -8075,19 +8150,18 @@ jQuery.fn.extend({
|
|
8075
8150
|
|
8076
8151
|
for ( p in prop ) {
|
8077
8152
|
e = new jQuery.fx( this, opt, p );
|
8078
|
-
|
8079
|
-
val = prop[p];
|
8153
|
+
val = prop[ p ];
|
8080
8154
|
|
8081
8155
|
if ( rfxtypes.test(val) ) {
|
8082
8156
|
e[ val === "toggle" ? hidden ? "show" : "hide" : val ]();
|
8083
8157
|
|
8084
8158
|
} else {
|
8085
|
-
parts = rfxnum.exec(val);
|
8159
|
+
parts = rfxnum.exec( val );
|
8086
8160
|
start = e.cur();
|
8087
8161
|
|
8088
8162
|
if ( parts ) {
|
8089
8163
|
end = parseFloat( parts[2] );
|
8090
|
-
unit = parts[3] || ( jQuery.cssNumber[
|
8164
|
+
unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" );
|
8091
8165
|
|
8092
8166
|
// We need to compute starting value
|
8093
8167
|
if ( unit !== "px" ) {
|
@@ -8098,7 +8172,7 @@ jQuery.fn.extend({
|
|
8098
8172
|
|
8099
8173
|
// If a +=/-= token was provided, we're doing a relative animation
|
8100
8174
|
if ( parts[1] ) {
|
8101
|
-
end = ((parts[1] === "-=" ? -1 : 1) * end) + start;
|
8175
|
+
end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start;
|
8102
8176
|
}
|
8103
8177
|
|
8104
8178
|
e.custom( start, end, unit );
|
@@ -8126,7 +8200,6 @@ jQuery.fn.extend({
|
|
8126
8200
|
if ( !gotoEnd ) {
|
8127
8201
|
jQuery._unmark( true, this );
|
8128
8202
|
}
|
8129
|
-
// go in reverse order so anything added to the queue during the loop is ignored
|
8130
8203
|
while ( i-- ) {
|
8131
8204
|
if ( timers[i].elem === this ) {
|
8132
8205
|
if (gotoEnd) {
|
@@ -8374,10 +8447,10 @@ jQuery.fx.prototype = {
|
|
8374
8447
|
this.now = t;
|
8375
8448
|
} else {
|
8376
8449
|
n = t - this.startTime;
|
8377
|
-
|
8378
8450
|
this.state = n / options.duration;
|
8451
|
+
|
8379
8452
|
// Perform the easing function, defaults to swing
|
8380
|
-
this.pos = jQuery.easing[options.animatedProperties[this.prop]](this.state, n, 0, 1, options.duration);
|
8453
|
+
this.pos = jQuery.easing[ options.animatedProperties[ this.prop ] ]( this.state, n, 0, 1, options.duration );
|
8381
8454
|
this.now = this.start + ((this.end - this.start) * this.pos);
|
8382
8455
|
}
|
8383
8456
|
// Perform the next step of the animation
|
@@ -8390,11 +8463,9 @@ jQuery.fx.prototype = {
|
|
8390
8463
|
|
8391
8464
|
jQuery.extend( jQuery.fx, {
|
8392
8465
|
tick: function() {
|
8393
|
-
var timers = jQuery.timers,
|
8394
|
-
i = timers.length;
|
8395
|
-
while ( i-- ) {
|
8466
|
+
for ( var timers = jQuery.timers, i = 0 ; i < timers.length ; ++i ) {
|
8396
8467
|
if ( !timers[i]() ) {
|
8397
|
-
timers.splice(i
|
8468
|
+
timers.splice(i--, 1);
|
8398
8469
|
}
|
8399
8470
|
}
|
8400
8471
|
|