jquery-cdn 2.1.1 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jquery-cdn/version.rb +1 -1
- data/vendor/assets/javascripts/jquery.js +277 -262
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23c93fccc4517642e02fd826fb38e79a2084e6a1
|
4
|
+
data.tar.gz: 4eb44a42122960d1cc3a03c57c846739cde78735
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4412a1d418836124529d454d3b3f637d01218be62320c2a70e9005b3abb61a3a43dbebf4a5de757b6f0e71daba3a30ab8a8b4d94fae75a925deddf74631e2994
|
7
|
+
data.tar.gz: b0cfb98d7a9b1332fe435d6b5596120d143357d5f9aa5335adb39dc36eaba32d9691fc002b5ef0a4e6733f561725b4e66737f685e03ec3004655a7e2db81caa9
|
data/lib/jquery-cdn/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* jQuery JavaScript Library v2.1.
|
2
|
+
* jQuery JavaScript Library v2.1.3
|
3
3
|
* http://jquery.com/
|
4
4
|
*
|
5
5
|
* Includes Sizzle.js
|
@@ -9,19 +9,19 @@
|
|
9
9
|
* Released under the MIT license
|
10
10
|
* http://jquery.org/license
|
11
11
|
*
|
12
|
-
* Date: 2014-
|
12
|
+
* Date: 2014-12-18T15:11Z
|
13
13
|
*/
|
14
14
|
|
15
15
|
(function( global, factory ) {
|
16
16
|
|
17
17
|
if ( typeof module === "object" && typeof module.exports === "object" ) {
|
18
|
-
// For CommonJS and CommonJS-like environments where a proper window
|
19
|
-
// execute the factory and get jQuery
|
20
|
-
// For environments that do not
|
21
|
-
// (such as Node.js), expose a
|
22
|
-
// This accentuates the need for the creation of a real window
|
18
|
+
// For CommonJS and CommonJS-like environments where a proper `window`
|
19
|
+
// is present, execute the factory and get jQuery.
|
20
|
+
// For environments that do not have a `window` with a `document`
|
21
|
+
// (such as Node.js), expose a factory as module.exports.
|
22
|
+
// This accentuates the need for the creation of a real `window`.
|
23
23
|
// e.g. var jQuery = require("jquery")(window);
|
24
|
-
// See ticket #14549 for more info
|
24
|
+
// See ticket #14549 for more info.
|
25
25
|
module.exports = global.document ?
|
26
26
|
factory( global, true ) :
|
27
27
|
function( w ) {
|
@@ -37,10 +37,10 @@
|
|
37
37
|
// Pass this if window is not defined yet
|
38
38
|
}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
|
39
39
|
|
40
|
-
//
|
40
|
+
// Support: Firefox 18+
|
41
|
+
// Can't be in strict mode, several libs including ASP.NET trace
|
41
42
|
// the stack via arguments.caller.callee and Firefox dies if
|
42
43
|
// you try to trace through "use strict" call chains. (#13335)
|
43
|
-
// Support: Firefox 18+
|
44
44
|
//
|
45
45
|
|
46
46
|
var arr = [];
|
@@ -67,7 +67,7 @@ var
|
|
67
67
|
// Use the correct document accordingly with window argument (sandbox)
|
68
68
|
document = window.document,
|
69
69
|
|
70
|
-
version = "2.1.
|
70
|
+
version = "2.1.3",
|
71
71
|
|
72
72
|
// Define a local copy of jQuery
|
73
73
|
jQuery = function( selector, context ) {
|
@@ -185,7 +185,7 @@ jQuery.extend = jQuery.fn.extend = function() {
|
|
185
185
|
if ( typeof target === "boolean" ) {
|
186
186
|
deep = target;
|
187
187
|
|
188
|
-
//
|
188
|
+
// Skip the boolean and the target
|
189
189
|
target = arguments[ i ] || {};
|
190
190
|
i++;
|
191
191
|
}
|
@@ -195,7 +195,7 @@ jQuery.extend = jQuery.fn.extend = function() {
|
|
195
195
|
target = {};
|
196
196
|
}
|
197
197
|
|
198
|
-
//
|
198
|
+
// Extend jQuery itself if only one argument is passed
|
199
199
|
if ( i === length ) {
|
200
200
|
target = this;
|
201
201
|
i--;
|
@@ -252,9 +252,6 @@ jQuery.extend({
|
|
252
252
|
|
253
253
|
noop: function() {},
|
254
254
|
|
255
|
-
// See test/unit/core.js for details concerning isFunction.
|
256
|
-
// Since version 1.3, DOM methods and functions like alert
|
257
|
-
// aren't supported. They return false on IE (#2968).
|
258
255
|
isFunction: function( obj ) {
|
259
256
|
return jQuery.type(obj) === "function";
|
260
257
|
},
|
@@ -269,7 +266,8 @@ jQuery.extend({
|
|
269
266
|
// parseFloat NaNs numeric-cast false positives (null|true|false|"")
|
270
267
|
// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
|
271
268
|
// subtraction forces infinities to NaN
|
272
|
-
|
269
|
+
// adding 1 corrects loss of precision from parseFloat (#15100)
|
270
|
+
return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0;
|
273
271
|
},
|
274
272
|
|
275
273
|
isPlainObject: function( obj ) {
|
@@ -303,7 +301,7 @@ jQuery.extend({
|
|
303
301
|
if ( obj == null ) {
|
304
302
|
return obj + "";
|
305
303
|
}
|
306
|
-
// Support: Android
|
304
|
+
// Support: Android<4.0, iOS<6 (functionish RegExp)
|
307
305
|
return typeof obj === "object" || typeof obj === "function" ?
|
308
306
|
class2type[ toString.call(obj) ] || "object" :
|
309
307
|
typeof obj;
|
@@ -333,6 +331,7 @@ jQuery.extend({
|
|
333
331
|
},
|
334
332
|
|
335
333
|
// Convert dashed to camelCase; used by the css and data modules
|
334
|
+
// Support: IE9-11+
|
336
335
|
// Microsoft forgot to hump their vendor prefix (#9572)
|
337
336
|
camelCase: function( string ) {
|
338
337
|
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
|
@@ -548,14 +547,14 @@ function isArraylike( obj ) {
|
|
548
547
|
}
|
549
548
|
var Sizzle =
|
550
549
|
/*!
|
551
|
-
* Sizzle CSS Selector Engine
|
550
|
+
* Sizzle CSS Selector Engine v2.2.0-pre
|
552
551
|
* http://sizzlejs.com/
|
553
552
|
*
|
554
|
-
* Copyright
|
553
|
+
* Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
|
555
554
|
* Released under the MIT license
|
556
555
|
* http://jquery.org/license
|
557
556
|
*
|
558
|
-
* Date: 2014-
|
557
|
+
* Date: 2014-12-16
|
559
558
|
*/
|
560
559
|
(function( window ) {
|
561
560
|
|
@@ -582,7 +581,7 @@ var i,
|
|
582
581
|
contains,
|
583
582
|
|
584
583
|
// Instance-specific data
|
585
|
-
expando = "sizzle" +
|
584
|
+
expando = "sizzle" + 1 * new Date(),
|
586
585
|
preferredDoc = window.document,
|
587
586
|
dirruns = 0,
|
588
587
|
done = 0,
|
@@ -597,7 +596,6 @@ var i,
|
|
597
596
|
},
|
598
597
|
|
599
598
|
// General-purpose constants
|
600
|
-
strundefined = typeof undefined,
|
601
599
|
MAX_NEGATIVE = 1 << 31,
|
602
600
|
|
603
601
|
// Instance methods
|
@@ -607,12 +605,13 @@ var i,
|
|
607
605
|
push_native = arr.push,
|
608
606
|
push = arr.push,
|
609
607
|
slice = arr.slice,
|
610
|
-
// Use a stripped-down indexOf
|
611
|
-
|
608
|
+
// Use a stripped-down indexOf as it's faster than native
|
609
|
+
// http://jsperf.com/thor-indexof-vs-for/5
|
610
|
+
indexOf = function( list, elem ) {
|
612
611
|
var i = 0,
|
613
|
-
len =
|
612
|
+
len = list.length;
|
614
613
|
for ( ; i < len; i++ ) {
|
615
|
-
if (
|
614
|
+
if ( list[i] === elem ) {
|
616
615
|
return i;
|
617
616
|
}
|
618
617
|
}
|
@@ -652,6 +651,7 @@ var i,
|
|
652
651
|
")\\)|)",
|
653
652
|
|
654
653
|
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
|
654
|
+
rwhitespace = new RegExp( whitespace + "+", "g" ),
|
655
655
|
rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
|
656
656
|
|
657
657
|
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
|
@@ -703,6 +703,14 @@ var i,
|
|
703
703
|
String.fromCharCode( high + 0x10000 ) :
|
704
704
|
// Supplemental Plane codepoint (surrogate pair)
|
705
705
|
String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
|
706
|
+
},
|
707
|
+
|
708
|
+
// Used for iframes
|
709
|
+
// See setDocument()
|
710
|
+
// Removing the function wrapper causes a "Permission Denied"
|
711
|
+
// error in IE
|
712
|
+
unloadHandler = function() {
|
713
|
+
setDocument();
|
706
714
|
};
|
707
715
|
|
708
716
|
// Optimize for push.apply( _, NodeList )
|
@@ -745,19 +753,18 @@ function Sizzle( selector, context, results, seed ) {
|
|
745
753
|
|
746
754
|
context = context || document;
|
747
755
|
results = results || [];
|
756
|
+
nodeType = context.nodeType;
|
748
757
|
|
749
|
-
if (
|
750
|
-
|
751
|
-
}
|
758
|
+
if ( typeof selector !== "string" || !selector ||
|
759
|
+
nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
|
752
760
|
|
753
|
-
|
754
|
-
return [];
|
761
|
+
return results;
|
755
762
|
}
|
756
763
|
|
757
|
-
if (
|
764
|
+
if ( !seed && documentIsHTML ) {
|
758
765
|
|
759
|
-
//
|
760
|
-
if ( (match = rquickExpr.exec( selector )) ) {
|
766
|
+
// Try to shortcut find operations when possible (e.g., not under DocumentFragment)
|
767
|
+
if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
|
761
768
|
// Speed-up: Sizzle("#ID")
|
762
769
|
if ( (m = match[1]) ) {
|
763
770
|
if ( nodeType === 9 ) {
|
@@ -789,7 +796,7 @@ function Sizzle( selector, context, results, seed ) {
|
|
789
796
|
return results;
|
790
797
|
|
791
798
|
// Speed-up: Sizzle(".CLASS")
|
792
|
-
} else if ( (m = match[3]) && support.getElementsByClassName
|
799
|
+
} else if ( (m = match[3]) && support.getElementsByClassName ) {
|
793
800
|
push.apply( results, context.getElementsByClassName( m ) );
|
794
801
|
return results;
|
795
802
|
}
|
@@ -799,7 +806,7 @@ function Sizzle( selector, context, results, seed ) {
|
|
799
806
|
if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
|
800
807
|
nid = old = expando;
|
801
808
|
newContext = context;
|
802
|
-
newSelector = nodeType
|
809
|
+
newSelector = nodeType !== 1 && selector;
|
803
810
|
|
804
811
|
// qSA works strangely on Element-rooted queries
|
805
812
|
// We can work around this by specifying an extra ID on the root
|
@@ -986,7 +993,7 @@ function createPositionalPseudo( fn ) {
|
|
986
993
|
* @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
|
987
994
|
*/
|
988
995
|
function testContext( context ) {
|
989
|
-
return context && typeof context.getElementsByTagName !==
|
996
|
+
return context && typeof context.getElementsByTagName !== "undefined" && context;
|
990
997
|
}
|
991
998
|
|
992
999
|
// Expose support vars for convenience
|
@@ -1010,9 +1017,8 @@ isXML = Sizzle.isXML = function( elem ) {
|
|
1010
1017
|
* @returns {Object} Returns the current document
|
1011
1018
|
*/
|
1012
1019
|
setDocument = Sizzle.setDocument = function( node ) {
|
1013
|
-
var hasCompare,
|
1014
|
-
doc = node ? node.ownerDocument || node : preferredDoc
|
1015
|
-
parent = doc.defaultView;
|
1020
|
+
var hasCompare, parent,
|
1021
|
+
doc = node ? node.ownerDocument || node : preferredDoc;
|
1016
1022
|
|
1017
1023
|
// If no document and documentElement is available, return
|
1018
1024
|
if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
|
@@ -1022,9 +1028,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1022
1028
|
// Set our document
|
1023
1029
|
document = doc;
|
1024
1030
|
docElem = doc.documentElement;
|
1025
|
-
|
1026
|
-
// Support tests
|
1027
|
-
documentIsHTML = !isXML( doc );
|
1031
|
+
parent = doc.defaultView;
|
1028
1032
|
|
1029
1033
|
// Support: IE>8
|
1030
1034
|
// If iframe document is assigned to "document" variable and if iframe has been reloaded,
|
@@ -1033,21 +1037,22 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1033
1037
|
if ( parent && parent !== parent.top ) {
|
1034
1038
|
// IE11 does not have attachEvent, so all must suffer
|
1035
1039
|
if ( parent.addEventListener ) {
|
1036
|
-
parent.addEventListener( "unload",
|
1037
|
-
setDocument();
|
1038
|
-
}, false );
|
1040
|
+
parent.addEventListener( "unload", unloadHandler, false );
|
1039
1041
|
} else if ( parent.attachEvent ) {
|
1040
|
-
parent.attachEvent( "onunload",
|
1041
|
-
setDocument();
|
1042
|
-
});
|
1042
|
+
parent.attachEvent( "onunload", unloadHandler );
|
1043
1043
|
}
|
1044
1044
|
}
|
1045
1045
|
|
1046
|
+
/* Support tests
|
1047
|
+
---------------------------------------------------------------------- */
|
1048
|
+
documentIsHTML = !isXML( doc );
|
1049
|
+
|
1046
1050
|
/* Attributes
|
1047
1051
|
---------------------------------------------------------------------- */
|
1048
1052
|
|
1049
1053
|
// Support: IE<8
|
1050
|
-
// Verify that getAttribute really returns attributes and not properties
|
1054
|
+
// Verify that getAttribute really returns attributes and not properties
|
1055
|
+
// (excepting IE8 booleans)
|
1051
1056
|
support.attributes = assert(function( div ) {
|
1052
1057
|
div.className = "i";
|
1053
1058
|
return !div.getAttribute("className");
|
@@ -1062,17 +1067,8 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1062
1067
|
return !div.getElementsByTagName("*").length;
|
1063
1068
|
});
|
1064
1069
|
|
1065
|
-
//
|
1066
|
-
support.getElementsByClassName = rnative.test( doc.getElementsByClassName )
|
1067
|
-
div.innerHTML = "<div class='a'></div><div class='a i'></div>";
|
1068
|
-
|
1069
|
-
// Support: Safari<4
|
1070
|
-
// Catch class over-caching
|
1071
|
-
div.firstChild.className = "i";
|
1072
|
-
// Support: Opera<10
|
1073
|
-
// Catch gEBCN failure to find non-leading classes
|
1074
|
-
return div.getElementsByClassName("i").length === 2;
|
1075
|
-
});
|
1070
|
+
// Support: IE<9
|
1071
|
+
support.getElementsByClassName = rnative.test( doc.getElementsByClassName );
|
1076
1072
|
|
1077
1073
|
// Support: IE<10
|
1078
1074
|
// Check if getElementById returns elements by name
|
@@ -1086,7 +1082,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1086
1082
|
// ID find and filter
|
1087
1083
|
if ( support.getById ) {
|
1088
1084
|
Expr.find["ID"] = function( id, context ) {
|
1089
|
-
if ( typeof context.getElementById !==
|
1085
|
+
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
1090
1086
|
var m = context.getElementById( id );
|
1091
1087
|
// Check parentNode to catch when Blackberry 4.6 returns
|
1092
1088
|
// nodes that are no longer in the document #6963
|
@@ -1107,7 +1103,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1107
1103
|
Expr.filter["ID"] = function( id ) {
|
1108
1104
|
var attrId = id.replace( runescape, funescape );
|
1109
1105
|
return function( elem ) {
|
1110
|
-
var node = typeof elem.getAttributeNode !==
|
1106
|
+
var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
|
1111
1107
|
return node && node.value === attrId;
|
1112
1108
|
};
|
1113
1109
|
};
|
@@ -1116,14 +1112,20 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1116
1112
|
// Tag
|
1117
1113
|
Expr.find["TAG"] = support.getElementsByTagName ?
|
1118
1114
|
function( tag, context ) {
|
1119
|
-
if ( typeof context.getElementsByTagName !==
|
1115
|
+
if ( typeof context.getElementsByTagName !== "undefined" ) {
|
1120
1116
|
return context.getElementsByTagName( tag );
|
1117
|
+
|
1118
|
+
// DocumentFragment nodes don't have gEBTN
|
1119
|
+
} else if ( support.qsa ) {
|
1120
|
+
return context.querySelectorAll( tag );
|
1121
1121
|
}
|
1122
1122
|
} :
|
1123
|
+
|
1123
1124
|
function( tag, context ) {
|
1124
1125
|
var elem,
|
1125
1126
|
tmp = [],
|
1126
1127
|
i = 0,
|
1128
|
+
// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
|
1127
1129
|
results = context.getElementsByTagName( tag );
|
1128
1130
|
|
1129
1131
|
// Filter out possible comments
|
@@ -1141,7 +1143,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1141
1143
|
|
1142
1144
|
// Class
|
1143
1145
|
Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
|
1144
|
-
if (
|
1146
|
+
if ( documentIsHTML ) {
|
1145
1147
|
return context.getElementsByClassName( className );
|
1146
1148
|
}
|
1147
1149
|
};
|
@@ -1170,13 +1172,15 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1170
1172
|
// setting a boolean content attribute,
|
1171
1173
|
// since its presence should be enough
|
1172
1174
|
// http://bugs.jquery.com/ticket/12359
|
1173
|
-
div.innerHTML = "<
|
1175
|
+
docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" +
|
1176
|
+
"<select id='" + expando + "-\f]' msallowcapture=''>" +
|
1177
|
+
"<option selected=''></option></select>";
|
1174
1178
|
|
1175
1179
|
// Support: IE8, Opera 11-12.16
|
1176
1180
|
// Nothing should be selected when empty strings follow ^= or $= or *=
|
1177
1181
|
// The test attribute must be unknown in Opera but "safe" for WinRT
|
1178
1182
|
// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
|
1179
|
-
if ( div.querySelectorAll("[
|
1183
|
+
if ( div.querySelectorAll("[msallowcapture^='']").length ) {
|
1180
1184
|
rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
|
1181
1185
|
}
|
1182
1186
|
|
@@ -1186,12 +1190,24 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1186
1190
|
rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
|
1187
1191
|
}
|
1188
1192
|
|
1193
|
+
// Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+
|
1194
|
+
if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
|
1195
|
+
rbuggyQSA.push("~=");
|
1196
|
+
}
|
1197
|
+
|
1189
1198
|
// Webkit/Opera - :checked should return selected option elements
|
1190
1199
|
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
|
1191
1200
|
// IE8 throws error here and will not see later tests
|
1192
1201
|
if ( !div.querySelectorAll(":checked").length ) {
|
1193
1202
|
rbuggyQSA.push(":checked");
|
1194
1203
|
}
|
1204
|
+
|
1205
|
+
// Support: Safari 8+, iOS 8+
|
1206
|
+
// https://bugs.webkit.org/show_bug.cgi?id=136851
|
1207
|
+
// In-page `selector#id sibing-combinator selector` fails
|
1208
|
+
if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
|
1209
|
+
rbuggyQSA.push(".#.+[+~]");
|
1210
|
+
}
|
1195
1211
|
});
|
1196
1212
|
|
1197
1213
|
assert(function( div ) {
|
@@ -1308,7 +1324,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1308
1324
|
|
1309
1325
|
// Maintain original order
|
1310
1326
|
return sortInput ?
|
1311
|
-
( indexOf
|
1327
|
+
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
|
1312
1328
|
0;
|
1313
1329
|
}
|
1314
1330
|
|
@@ -1335,7 +1351,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1335
1351
|
aup ? -1 :
|
1336
1352
|
bup ? 1 :
|
1337
1353
|
sortInput ?
|
1338
|
-
( indexOf
|
1354
|
+
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
|
1339
1355
|
0;
|
1340
1356
|
|
1341
1357
|
// If the nodes are siblings, we can do a quick check
|
@@ -1398,7 +1414,7 @@ Sizzle.matchesSelector = function( elem, expr ) {
|
|
1398
1414
|
elem.document && elem.document.nodeType !== 11 ) {
|
1399
1415
|
return ret;
|
1400
1416
|
}
|
1401
|
-
} catch(e) {}
|
1417
|
+
} catch (e) {}
|
1402
1418
|
}
|
1403
1419
|
|
1404
1420
|
return Sizzle( expr, document, null, [ elem ] ).length > 0;
|
@@ -1617,7 +1633,7 @@ Expr = Sizzle.selectors = {
|
|
1617
1633
|
return pattern ||
|
1618
1634
|
(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
|
1619
1635
|
classCache( className, function( elem ) {
|
1620
|
-
return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !==
|
1636
|
+
return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
|
1621
1637
|
});
|
1622
1638
|
},
|
1623
1639
|
|
@@ -1639,7 +1655,7 @@ Expr = Sizzle.selectors = {
|
|
1639
1655
|
operator === "^=" ? check && result.indexOf( check ) === 0 :
|
1640
1656
|
operator === "*=" ? check && result.indexOf( check ) > -1 :
|
1641
1657
|
operator === "$=" ? check && result.slice( -check.length ) === check :
|
1642
|
-
operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
|
1658
|
+
operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
|
1643
1659
|
operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
|
1644
1660
|
false;
|
1645
1661
|
};
|
@@ -1759,7 +1775,7 @@ Expr = Sizzle.selectors = {
|
|
1759
1775
|
matched = fn( seed, argument ),
|
1760
1776
|
i = matched.length;
|
1761
1777
|
while ( i-- ) {
|
1762
|
-
idx = indexOf
|
1778
|
+
idx = indexOf( seed, matched[i] );
|
1763
1779
|
seed[ idx ] = !( matches[ idx ] = matched[i] );
|
1764
1780
|
}
|
1765
1781
|
}) :
|
@@ -1798,6 +1814,8 @@ Expr = Sizzle.selectors = {
|
|
1798
1814
|
function( elem, context, xml ) {
|
1799
1815
|
input[0] = elem;
|
1800
1816
|
matcher( input, null, xml, results );
|
1817
|
+
// Don't keep the element (issue #299)
|
1818
|
+
input[0] = null;
|
1801
1819
|
return !results.pop();
|
1802
1820
|
};
|
1803
1821
|
}),
|
@@ -1809,6 +1827,7 @@ Expr = Sizzle.selectors = {
|
|
1809
1827
|
}),
|
1810
1828
|
|
1811
1829
|
"contains": markFunction(function( text ) {
|
1830
|
+
text = text.replace( runescape, funescape );
|
1812
1831
|
return function( elem ) {
|
1813
1832
|
return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
|
1814
1833
|
};
|
@@ -2230,7 +2249,7 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
|
|
2230
2249
|
i = matcherOut.length;
|
2231
2250
|
while ( i-- ) {
|
2232
2251
|
if ( (elem = matcherOut[i]) &&
|
2233
|
-
(temp = postFinder ? indexOf
|
2252
|
+
(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
|
2234
2253
|
|
2235
2254
|
seed[temp] = !(results[temp] = elem);
|
2236
2255
|
}
|
@@ -2265,13 +2284,16 @@ function matcherFromTokens( tokens ) {
|
|
2265
2284
|
return elem === checkContext;
|
2266
2285
|
}, implicitRelative, true ),
|
2267
2286
|
matchAnyContext = addCombinator( function( elem ) {
|
2268
|
-
return indexOf
|
2287
|
+
return indexOf( checkContext, elem ) > -1;
|
2269
2288
|
}, implicitRelative, true ),
|
2270
2289
|
matchers = [ function( elem, context, xml ) {
|
2271
|
-
|
2290
|
+
var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
|
2272
2291
|
(checkContext = context).nodeType ?
|
2273
2292
|
matchContext( elem, context, xml ) :
|
2274
2293
|
matchAnyContext( elem, context, xml ) );
|
2294
|
+
// Avoid hanging onto element (issue #299)
|
2295
|
+
checkContext = null;
|
2296
|
+
return ret;
|
2275
2297
|
} ];
|
2276
2298
|
|
2277
2299
|
for ( ; i < len; i++ ) {
|
@@ -2521,7 +2543,7 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|
2521
2543
|
// Sort stability
|
2522
2544
|
support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
|
2523
2545
|
|
2524
|
-
// Support: Chrome
|
2546
|
+
// Support: Chrome 14-35+
|
2525
2547
|
// Always assume duplicates if they aren't passed to the comparison function
|
2526
2548
|
support.detectDuplicates = !!hasDuplicate;
|
2527
2549
|
|
@@ -2730,7 +2752,7 @@ var rootjQuery,
|
|
2730
2752
|
if ( match[1] ) {
|
2731
2753
|
context = context instanceof jQuery ? context[0] : context;
|
2732
2754
|
|
2733
|
-
// scripts is true for back-compat
|
2755
|
+
// Option to run scripts is true for back-compat
|
2734
2756
|
// Intentionally let the error be thrown if parseHTML is not present
|
2735
2757
|
jQuery.merge( this, jQuery.parseHTML(
|
2736
2758
|
match[1],
|
@@ -2758,8 +2780,8 @@ var rootjQuery,
|
|
2758
2780
|
} else {
|
2759
2781
|
elem = document.getElementById( match[2] );
|
2760
2782
|
|
2761
|
-
//
|
2762
|
-
//
|
2783
|
+
// Support: Blackberry 4.6
|
2784
|
+
// gEBID returns nodes no longer in the document (#6963)
|
2763
2785
|
if ( elem && elem.parentNode ) {
|
2764
2786
|
// Inject the element directly into the jQuery object
|
2765
2787
|
this.length = 1;
|
@@ -2812,7 +2834,7 @@ rootjQuery = jQuery( document );
|
|
2812
2834
|
|
2813
2835
|
|
2814
2836
|
var rparentsprev = /^(?:parents|prev(?:Until|All))/,
|
2815
|
-
//
|
2837
|
+
// Methods guaranteed to produce a unique set when starting from a unique set
|
2816
2838
|
guaranteedUnique = {
|
2817
2839
|
children: true,
|
2818
2840
|
contents: true,
|
@@ -2892,8 +2914,7 @@ jQuery.fn.extend({
|
|
2892
2914
|
return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );
|
2893
2915
|
},
|
2894
2916
|
|
2895
|
-
// Determine the position of an element within
|
2896
|
-
// the matched set of elements
|
2917
|
+
// Determine the position of an element within the set
|
2897
2918
|
index: function( elem ) {
|
2898
2919
|
|
2899
2920
|
// No argument, return index in parent
|
@@ -2901,7 +2922,7 @@ jQuery.fn.extend({
|
|
2901
2922
|
return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
|
2902
2923
|
}
|
2903
2924
|
|
2904
|
-
//
|
2925
|
+
// Index in selector
|
2905
2926
|
if ( typeof elem === "string" ) {
|
2906
2927
|
return indexOf.call( jQuery( elem ), this[ 0 ] );
|
2907
2928
|
}
|
@@ -3317,7 +3338,7 @@ jQuery.extend({
|
|
3317
3338
|
|
3318
3339
|
progressValues, progressContexts, resolveContexts;
|
3319
3340
|
|
3320
|
-
//
|
3341
|
+
// Add listeners to Deferred subordinates; treat others as resolved
|
3321
3342
|
if ( length > 1 ) {
|
3322
3343
|
progressValues = new Array( length );
|
3323
3344
|
progressContexts = new Array( length );
|
@@ -3334,7 +3355,7 @@ jQuery.extend({
|
|
3334
3355
|
}
|
3335
3356
|
}
|
3336
3357
|
|
3337
|
-
//
|
3358
|
+
// If we're not waiting on anything, resolve the master
|
3338
3359
|
if ( !remaining ) {
|
3339
3360
|
deferred.resolveWith( resolveContexts, resolveValues );
|
3340
3361
|
}
|
@@ -3413,7 +3434,7 @@ jQuery.ready.promise = function( obj ) {
|
|
3413
3434
|
readyList = jQuery.Deferred();
|
3414
3435
|
|
3415
3436
|
// Catch cases where $(document).ready() is called after the browser event has already occurred.
|
3416
|
-
//
|
3437
|
+
// We once tried to use readyState "interactive" here, but it caused issues like the one
|
3417
3438
|
// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
|
3418
3439
|
if ( document.readyState === "complete" ) {
|
3419
3440
|
// Handle it asynchronously to allow scripts the opportunity to delay ready
|
@@ -3507,7 +3528,7 @@ jQuery.acceptData = function( owner ) {
|
|
3507
3528
|
|
3508
3529
|
|
3509
3530
|
function Data() {
|
3510
|
-
// Support: Android
|
3531
|
+
// Support: Android<4,
|
3511
3532
|
// Old WebKit does not have Object.preventExtensions/freeze method,
|
3512
3533
|
// return new empty object instead with no [[set]] accessor
|
3513
3534
|
Object.defineProperty( this.cache = {}, 0, {
|
@@ -3516,7 +3537,7 @@ function Data() {
|
|
3516
3537
|
}
|
3517
3538
|
});
|
3518
3539
|
|
3519
|
-
this.expando = jQuery.expando +
|
3540
|
+
this.expando = jQuery.expando + Data.uid++;
|
3520
3541
|
}
|
3521
3542
|
|
3522
3543
|
Data.uid = 1;
|
@@ -3544,7 +3565,7 @@ Data.prototype = {
|
|
3544
3565
|
descriptor[ this.expando ] = { value: unlock };
|
3545
3566
|
Object.defineProperties( owner, descriptor );
|
3546
3567
|
|
3547
|
-
// Support: Android
|
3568
|
+
// Support: Android<4
|
3548
3569
|
// Fallback to a less secure definition
|
3549
3570
|
} catch ( e ) {
|
3550
3571
|
descriptor[ this.expando ] = unlock;
|
@@ -3684,17 +3705,16 @@ var data_user = new Data();
|
|
3684
3705
|
|
3685
3706
|
|
3686
3707
|
|
3687
|
-
|
3688
|
-
|
3689
|
-
|
3690
|
-
|
3691
|
-
|
3692
|
-
|
3693
|
-
|
3694
|
-
|
3695
|
-
|
3696
|
-
|
3697
|
-
*/
|
3708
|
+
// Implementation Summary
|
3709
|
+
//
|
3710
|
+
// 1. Enforce API surface and semantic compatibility with 1.9.x branch
|
3711
|
+
// 2. Improve the module's maintainability by reducing the storage
|
3712
|
+
// paths to a single mechanism.
|
3713
|
+
// 3. Use the same single mechanism to support "private" and "user" data.
|
3714
|
+
// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
|
3715
|
+
// 5. Avoid exposing implementation details on user objects (eg. expando properties)
|
3716
|
+
// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
|
3717
|
+
|
3698
3718
|
var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
|
3699
3719
|
rmultiDash = /([A-Z])/g;
|
3700
3720
|
|
@@ -3899,7 +3919,7 @@ jQuery.extend({
|
|
3899
3919
|
queue.unshift( "inprogress" );
|
3900
3920
|
}
|
3901
3921
|
|
3902
|
-
//
|
3922
|
+
// Clear up the last queue stop function
|
3903
3923
|
delete hooks.stop;
|
3904
3924
|
fn.call( elem, next, hooks );
|
3905
3925
|
}
|
@@ -3909,7 +3929,7 @@ jQuery.extend({
|
|
3909
3929
|
}
|
3910
3930
|
},
|
3911
3931
|
|
3912
|
-
//
|
3932
|
+
// Not public - generate a queueHooks object, or return the current one
|
3913
3933
|
_queueHooks: function( elem, type ) {
|
3914
3934
|
var key = type + "queueHooks";
|
3915
3935
|
return data_priv.get( elem, key ) || data_priv.access( elem, key, {
|
@@ -3939,7 +3959,7 @@ jQuery.fn.extend({
|
|
3939
3959
|
this.each(function() {
|
3940
3960
|
var queue = jQuery.queue( this, type, data );
|
3941
3961
|
|
3942
|
-
//
|
3962
|
+
// Ensure a hooks for this queue
|
3943
3963
|
jQuery._queueHooks( this, type );
|
3944
3964
|
|
3945
3965
|
if ( type === "fx" && queue[0] !== "inprogress" ) {
|
@@ -4006,21 +4026,22 @@ var rcheckableType = (/^(?:checkbox|radio)$/i);
|
|
4006
4026
|
div = fragment.appendChild( document.createElement( "div" ) ),
|
4007
4027
|
input = document.createElement( "input" );
|
4008
4028
|
|
4009
|
-
//
|
4029
|
+
// Support: Safari<=5.1
|
4030
|
+
// Check state lost if the name is set (#11217)
|
4010
4031
|
// Support: Windows Web Apps (WWA)
|
4011
|
-
// `name` and `type`
|
4032
|
+
// `name` and `type` must use .setAttribute for WWA (#14901)
|
4012
4033
|
input.setAttribute( "type", "radio" );
|
4013
4034
|
input.setAttribute( "checked", "checked" );
|
4014
4035
|
input.setAttribute( "name", "t" );
|
4015
4036
|
|
4016
4037
|
div.appendChild( input );
|
4017
4038
|
|
4018
|
-
// Support: Safari
|
4019
|
-
//
|
4039
|
+
// Support: Safari<=5.1, Android<4.2
|
4040
|
+
// Older WebKit doesn't clone checked state correctly in fragments
|
4020
4041
|
support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
|
4021
4042
|
|
4043
|
+
// Support: IE<=11+
|
4022
4044
|
// Make sure textarea (and checkbox) defaultValue is properly cloned
|
4023
|
-
// Support: IE9-IE11+
|
4024
4045
|
div.innerHTML = "<textarea>x</textarea>";
|
4025
4046
|
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
|
4026
4047
|
})();
|
@@ -4398,8 +4419,8 @@ jQuery.event = {
|
|
4398
4419
|
j = 0;
|
4399
4420
|
while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
|
4400
4421
|
|
4401
|
-
// Triggered event must either 1) have no namespace, or
|
4402
|
-
//
|
4422
|
+
// Triggered event must either 1) have no namespace, or 2) have namespace(s)
|
4423
|
+
// a subset or equal to those in the bound event (both can have no namespace).
|
4403
4424
|
if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
|
4404
4425
|
|
4405
4426
|
event.handleObj = handleObj;
|
@@ -4549,7 +4570,7 @@ jQuery.event = {
|
|
4549
4570
|
event.target = document;
|
4550
4571
|
}
|
4551
4572
|
|
4552
|
-
// Support: Safari 6.0+, Chrome
|
4573
|
+
// Support: Safari 6.0+, Chrome<28
|
4553
4574
|
// Target should not be a text node (#504, #13143)
|
4554
4575
|
if ( event.target.nodeType === 3 ) {
|
4555
4576
|
event.target = event.target.parentNode;
|
@@ -4654,7 +4675,7 @@ jQuery.Event = function( src, props ) {
|
|
4654
4675
|
// by a handler lower down the tree; reflect the correct value.
|
4655
4676
|
this.isDefaultPrevented = src.defaultPrevented ||
|
4656
4677
|
src.defaultPrevented === undefined &&
|
4657
|
-
// Support: Android
|
4678
|
+
// Support: Android<4.0
|
4658
4679
|
src.returnValue === false ?
|
4659
4680
|
returnTrue :
|
4660
4681
|
returnFalse;
|
@@ -4744,8 +4765,8 @@ jQuery.each({
|
|
4744
4765
|
};
|
4745
4766
|
});
|
4746
4767
|
|
4747
|
-
// Create "bubbling" focus and blur events
|
4748
4768
|
// Support: Firefox, Chrome, Safari
|
4769
|
+
// Create "bubbling" focus and blur events
|
4749
4770
|
if ( !support.focusinBubbles ) {
|
4750
4771
|
jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
|
4751
4772
|
|
@@ -4898,7 +4919,7 @@ var
|
|
4898
4919
|
// We have to close these tags to support XHTML (#13200)
|
4899
4920
|
wrapMap = {
|
4900
4921
|
|
4901
|
-
// Support:
|
4922
|
+
// Support: IE9
|
4902
4923
|
option: [ 1, "<select multiple='multiple'>", "</select>" ],
|
4903
4924
|
|
4904
4925
|
thead: [ 1, "<table>", "</table>" ],
|
@@ -4909,7 +4930,7 @@ var
|
|
4909
4930
|
_default: [ 0, "", "" ]
|
4910
4931
|
};
|
4911
4932
|
|
4912
|
-
// Support:
|
4933
|
+
// Support: IE9
|
4913
4934
|
wrapMap.optgroup = wrapMap.option;
|
4914
4935
|
|
4915
4936
|
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
|
@@ -4999,7 +5020,7 @@ function getAll( context, tag ) {
|
|
4999
5020
|
ret;
|
5000
5021
|
}
|
5001
5022
|
|
5002
|
-
//
|
5023
|
+
// Fix IE bugs, see support tests
|
5003
5024
|
function fixInput( src, dest ) {
|
5004
5025
|
var nodeName = dest.nodeName.toLowerCase();
|
5005
5026
|
|
@@ -5019,8 +5040,7 @@ jQuery.extend({
|
|
5019
5040
|
clone = elem.cloneNode( true ),
|
5020
5041
|
inPage = jQuery.contains( elem.ownerDocument, elem );
|
5021
5042
|
|
5022
|
-
//
|
5023
|
-
// Fix Cloning issues
|
5043
|
+
// Fix IE cloning issues
|
5024
5044
|
if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
|
5025
5045
|
!jQuery.isXMLDoc( elem ) ) {
|
5026
5046
|
|
@@ -5071,8 +5091,8 @@ jQuery.extend({
|
|
5071
5091
|
|
5072
5092
|
// Add nodes directly
|
5073
5093
|
if ( jQuery.type( elem ) === "object" ) {
|
5074
|
-
// Support: QtWebKit
|
5075
|
-
//
|
5094
|
+
// Support: QtWebKit, PhantomJS
|
5095
|
+
// push.apply(_, arraylike) throws on ancient WebKit
|
5076
5096
|
jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
|
5077
5097
|
|
5078
5098
|
// Convert non-html into a text node
|
@@ -5094,15 +5114,14 @@ jQuery.extend({
|
|
5094
5114
|
tmp = tmp.lastChild;
|
5095
5115
|
}
|
5096
5116
|
|
5097
|
-
// Support: QtWebKit
|
5098
|
-
//
|
5117
|
+
// Support: QtWebKit, PhantomJS
|
5118
|
+
// push.apply(_, arraylike) throws on ancient WebKit
|
5099
5119
|
jQuery.merge( nodes, tmp.childNodes );
|
5100
5120
|
|
5101
5121
|
// Remember the top-level container
|
5102
5122
|
tmp = fragment.firstChild;
|
5103
5123
|
|
5104
|
-
//
|
5105
|
-
// Support: Webkit, IE
|
5124
|
+
// Ensure the created nodes are orphaned (#12392)
|
5106
5125
|
tmp.textContent = "";
|
5107
5126
|
}
|
5108
5127
|
}
|
@@ -5464,7 +5483,7 @@ function actualDisplay( name, doc ) {
|
|
5464
5483
|
// getDefaultComputedStyle might be reliably used only on attached element
|
5465
5484
|
display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
|
5466
5485
|
|
5467
|
-
// Use of this method is a temporary fix (more like
|
5486
|
+
// Use of this method is a temporary fix (more like optimization) until something better comes along,
|
5468
5487
|
// since it was removed from specification and supported only in FF
|
5469
5488
|
style.display : jQuery.css( elem[ 0 ], "display" );
|
5470
5489
|
|
@@ -5514,7 +5533,14 @@ var rmargin = (/^margin/);
|
|
5514
5533
|
var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
|
5515
5534
|
|
5516
5535
|
var getStyles = function( elem ) {
|
5517
|
-
|
5536
|
+
// Support: IE<=11+, Firefox<=30+ (#15098, #14150)
|
5537
|
+
// IE throws on elements created in popups
|
5538
|
+
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
|
5539
|
+
if ( elem.ownerDocument.defaultView.opener ) {
|
5540
|
+
return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
|
5541
|
+
}
|
5542
|
+
|
5543
|
+
return window.getComputedStyle( elem, null );
|
5518
5544
|
};
|
5519
5545
|
|
5520
5546
|
|
@@ -5526,7 +5552,7 @@ function curCSS( elem, name, computed ) {
|
|
5526
5552
|
computed = computed || getStyles( elem );
|
5527
5553
|
|
5528
5554
|
// Support: IE9
|
5529
|
-
// getPropertyValue is only needed for .css('filter')
|
5555
|
+
// getPropertyValue is only needed for .css('filter') (#12537)
|
5530
5556
|
if ( computed ) {
|
5531
5557
|
ret = computed.getPropertyValue( name ) || computed[ name ];
|
5532
5558
|
}
|
@@ -5572,15 +5598,13 @@ function addGetHookIf( conditionFn, hookFn ) {
|
|
5572
5598
|
return {
|
5573
5599
|
get: function() {
|
5574
5600
|
if ( conditionFn() ) {
|
5575
|
-
// Hook not needed (or it's not possible to use it due
|
5576
|
-
// remove it.
|
5577
|
-
// Since there are no other hooks for marginRight, remove the whole object.
|
5601
|
+
// Hook not needed (or it's not possible to use it due
|
5602
|
+
// to missing dependency), remove it.
|
5578
5603
|
delete this.get;
|
5579
5604
|
return;
|
5580
5605
|
}
|
5581
5606
|
|
5582
5607
|
// Hook needed; redefine it so that the support test is not executed again.
|
5583
|
-
|
5584
5608
|
return (this.get = hookFn).apply( this, arguments );
|
5585
5609
|
}
|
5586
5610
|
};
|
@@ -5597,6 +5621,8 @@ function addGetHookIf( conditionFn, hookFn ) {
|
|
5597
5621
|
return;
|
5598
5622
|
}
|
5599
5623
|
|
5624
|
+
// Support: IE9-11+
|
5625
|
+
// Style of cloned element affects source element cloned (#8908)
|
5600
5626
|
div.style.backgroundClip = "content-box";
|
5601
5627
|
div.cloneNode( true ).style.backgroundClip = "";
|
5602
5628
|
support.clearCloneStyle = div.style.backgroundClip === "content-box";
|
@@ -5629,6 +5655,7 @@ function addGetHookIf( conditionFn, hookFn ) {
|
|
5629
5655
|
if ( window.getComputedStyle ) {
|
5630
5656
|
jQuery.extend( support, {
|
5631
5657
|
pixelPosition: function() {
|
5658
|
+
|
5632
5659
|
// This test is executed only once but we still do memoizing
|
5633
5660
|
// since we can use the boxSizingReliable pre-computing.
|
5634
5661
|
// No need to check if the test was already performed, though.
|
@@ -5642,6 +5669,7 @@ function addGetHookIf( conditionFn, hookFn ) {
|
|
5642
5669
|
return boxSizingReliableVal;
|
5643
5670
|
},
|
5644
5671
|
reliableMarginRight: function() {
|
5672
|
+
|
5645
5673
|
// Support: Android 2.3
|
5646
5674
|
// Check if div with explicit width and no margin-right incorrectly
|
5647
5675
|
// gets computed margin-right based on width of container. (#3333)
|
@@ -5663,6 +5691,7 @@ function addGetHookIf( conditionFn, hookFn ) {
|
|
5663
5691
|
ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight );
|
5664
5692
|
|
5665
5693
|
docElem.removeChild( container );
|
5694
|
+
div.removeChild( marginDiv );
|
5666
5695
|
|
5667
5696
|
return ret;
|
5668
5697
|
}
|
@@ -5694,8 +5723,8 @@ jQuery.swap = function( elem, options, callback, args ) {
|
|
5694
5723
|
|
5695
5724
|
|
5696
5725
|
var
|
5697
|
-
//
|
5698
|
-
//
|
5726
|
+
// Swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
|
5727
|
+
// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
|
5699
5728
|
rdisplayswap = /^(none|table(?!-c[ea]).+)/,
|
5700
5729
|
rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
|
5701
5730
|
rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ),
|
@@ -5708,15 +5737,15 @@ var
|
|
5708
5737
|
|
5709
5738
|
cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
|
5710
5739
|
|
5711
|
-
//
|
5740
|
+
// Return a css property mapped to a potentially vendor prefixed property
|
5712
5741
|
function vendorPropName( style, name ) {
|
5713
5742
|
|
5714
|
-
//
|
5743
|
+
// Shortcut for names that are not vendor prefixed
|
5715
5744
|
if ( name in style ) {
|
5716
5745
|
return name;
|
5717
5746
|
}
|
5718
5747
|
|
5719
|
-
//
|
5748
|
+
// Check for vendor prefixed names
|
5720
5749
|
var capName = name[0].toUpperCase() + name.slice(1),
|
5721
5750
|
origName = name,
|
5722
5751
|
i = cssPrefixes.length;
|
@@ -5749,7 +5778,7 @@ function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
|
|
5749
5778
|
val = 0;
|
5750
5779
|
|
5751
5780
|
for ( ; i < 4; i += 2 ) {
|
5752
|
-
//
|
5781
|
+
// Both box models exclude margin, so add it if we want it
|
5753
5782
|
if ( extra === "margin" ) {
|
5754
5783
|
val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
|
5755
5784
|
}
|
@@ -5760,15 +5789,15 @@ function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
|
|
5760
5789
|
val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
5761
5790
|
}
|
5762
5791
|
|
5763
|
-
//
|
5792
|
+
// At this point, extra isn't border nor margin, so remove border
|
5764
5793
|
if ( extra !== "margin" ) {
|
5765
5794
|
val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
5766
5795
|
}
|
5767
5796
|
} else {
|
5768
|
-
//
|
5797
|
+
// At this point, extra isn't content, so add padding
|
5769
5798
|
val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
5770
5799
|
|
5771
|
-
//
|
5800
|
+
// At this point, extra isn't content nor padding, so add border
|
5772
5801
|
if ( extra !== "padding" ) {
|
5773
5802
|
val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
5774
5803
|
}
|
@@ -5786,7 +5815,7 @@ function getWidthOrHeight( elem, name, extra ) {
|
|
5786
5815
|
styles = getStyles( elem ),
|
5787
5816
|
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
5788
5817
|
|
5789
|
-
//
|
5818
|
+
// Some non-html elements return undefined for offsetWidth, so check for null/undefined
|
5790
5819
|
// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
|
5791
5820
|
// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
|
5792
5821
|
if ( val <= 0 || val == null ) {
|
@@ -5801,7 +5830,7 @@ function getWidthOrHeight( elem, name, extra ) {
|
|
5801
5830
|
return val;
|
5802
5831
|
}
|
5803
5832
|
|
5804
|
-
//
|
5833
|
+
// Check for style in case a browser which returns unreliable values
|
5805
5834
|
// for getComputedStyle silently falls back to the reliable elem.style
|
5806
5835
|
valueIsBorderBox = isBorderBox &&
|
5807
5836
|
( support.boxSizingReliable() || val === elem.style[ name ] );
|
@@ -5810,7 +5839,7 @@ function getWidthOrHeight( elem, name, extra ) {
|
|
5810
5839
|
val = parseFloat( val ) || 0;
|
5811
5840
|
}
|
5812
5841
|
|
5813
|
-
//
|
5842
|
+
// Use the active box-sizing model to add/subtract irrelevant styles
|
5814
5843
|
return ( val +
|
5815
5844
|
augmentWidthOrHeight(
|
5816
5845
|
elem,
|
@@ -5874,12 +5903,14 @@ function showHide( elements, show ) {
|
|
5874
5903
|
}
|
5875
5904
|
|
5876
5905
|
jQuery.extend({
|
5906
|
+
|
5877
5907
|
// Add in style property hooks for overriding the default
|
5878
5908
|
// behavior of getting and setting a style property
|
5879
5909
|
cssHooks: {
|
5880
5910
|
opacity: {
|
5881
5911
|
get: function( elem, computed ) {
|
5882
5912
|
if ( computed ) {
|
5913
|
+
|
5883
5914
|
// We should always get a number back from opacity
|
5884
5915
|
var ret = curCSS( elem, "opacity" );
|
5885
5916
|
return ret === "" ? "1" : ret;
|
@@ -5907,12 +5938,12 @@ jQuery.extend({
|
|
5907
5938
|
// Add in properties whose names you wish to fix before
|
5908
5939
|
// setting or getting the value
|
5909
5940
|
cssProps: {
|
5910
|
-
// normalize float css property
|
5911
5941
|
"float": "cssFloat"
|
5912
5942
|
},
|
5913
5943
|
|
5914
5944
|
// Get and set the style property on a DOM Node
|
5915
5945
|
style: function( elem, name, value, extra ) {
|
5946
|
+
|
5916
5947
|
// Don't set styles on text and comment nodes
|
5917
5948
|
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
|
5918
5949
|
return;
|
@@ -5925,33 +5956,32 @@ jQuery.extend({
|
|
5925
5956
|
|
5926
5957
|
name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
|
5927
5958
|
|
5928
|
-
//
|
5929
|
-
// followed by the unprefixed version
|
5959
|
+
// Gets hook for the prefixed version, then unprefixed version
|
5930
5960
|
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
5931
5961
|
|
5932
5962
|
// Check if we're setting a value
|
5933
5963
|
if ( value !== undefined ) {
|
5934
5964
|
type = typeof value;
|
5935
5965
|
|
5936
|
-
//
|
5966
|
+
// Convert "+=" or "-=" to relative numbers (#7345)
|
5937
5967
|
if ( type === "string" && (ret = rrelNum.exec( value )) ) {
|
5938
5968
|
value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
|
5939
5969
|
// Fixes bug #9237
|
5940
5970
|
type = "number";
|
5941
5971
|
}
|
5942
5972
|
|
5943
|
-
// Make sure that null and NaN values aren't set
|
5973
|
+
// Make sure that null and NaN values aren't set (#7116)
|
5944
5974
|
if ( value == null || value !== value ) {
|
5945
5975
|
return;
|
5946
5976
|
}
|
5947
5977
|
|
5948
|
-
// If a number
|
5978
|
+
// If a number, add 'px' to the (except for certain CSS properties)
|
5949
5979
|
if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
|
5950
5980
|
value += "px";
|
5951
5981
|
}
|
5952
5982
|
|
5953
|
-
//
|
5954
|
-
//
|
5983
|
+
// Support: IE9-11+
|
5984
|
+
// background-* props affect original clone's values
|
5955
5985
|
if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
|
5956
5986
|
style[ name ] = "inherit";
|
5957
5987
|
}
|
@@ -5979,8 +6009,7 @@ jQuery.extend({
|
|
5979
6009
|
// Make sure that we're working with the right name
|
5980
6010
|
name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
|
5981
6011
|
|
5982
|
-
//
|
5983
|
-
// followed by the unprefixed version
|
6012
|
+
// Try prefixed name followed by the unprefixed name
|
5984
6013
|
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
5985
6014
|
|
5986
6015
|
// If a hook was provided get the computed value from there
|
@@ -5993,12 +6022,12 @@ jQuery.extend({
|
|
5993
6022
|
val = curCSS( elem, name, styles );
|
5994
6023
|
}
|
5995
6024
|
|
5996
|
-
//
|
6025
|
+
// Convert "normal" to computed value
|
5997
6026
|
if ( val === "normal" && name in cssNormalTransform ) {
|
5998
6027
|
val = cssNormalTransform[ name ];
|
5999
6028
|
}
|
6000
6029
|
|
6001
|
-
//
|
6030
|
+
// Make numeric if forced or a qualifier was provided and val looks numeric
|
6002
6031
|
if ( extra === "" || extra ) {
|
6003
6032
|
num = parseFloat( val );
|
6004
6033
|
return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
|
@@ -6011,8 +6040,9 @@ jQuery.each([ "height", "width" ], function( i, name ) {
|
|
6011
6040
|
jQuery.cssHooks[ name ] = {
|
6012
6041
|
get: function( elem, computed, extra ) {
|
6013
6042
|
if ( computed ) {
|
6014
|
-
|
6015
|
-
//
|
6043
|
+
|
6044
|
+
// Certain elements can have dimension info if we invisibly show them
|
6045
|
+
// but it must have a current display style that would benefit
|
6016
6046
|
return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ?
|
6017
6047
|
jQuery.swap( elem, cssShow, function() {
|
6018
6048
|
return getWidthOrHeight( elem, name, extra );
|
@@ -6040,8 +6070,6 @@ jQuery.each([ "height", "width" ], function( i, name ) {
|
|
6040
6070
|
jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
|
6041
6071
|
function( elem, computed ) {
|
6042
6072
|
if ( computed ) {
|
6043
|
-
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
|
6044
|
-
// Work around by temporarily setting element display to inline-block
|
6045
6073
|
return jQuery.swap( elem, { "display": "inline-block" },
|
6046
6074
|
curCSS, [ elem, "marginRight" ] );
|
6047
6075
|
}
|
@@ -6059,7 +6087,7 @@ jQuery.each({
|
|
6059
6087
|
var i = 0,
|
6060
6088
|
expanded = {},
|
6061
6089
|
|
6062
|
-
//
|
6090
|
+
// Assumes a single number if not a string
|
6063
6091
|
parts = typeof value === "string" ? value.split(" ") : [ value ];
|
6064
6092
|
|
6065
6093
|
for ( ; i < 4; i++ ) {
|
@@ -6182,17 +6210,18 @@ Tween.propHooks = {
|
|
6182
6210
|
return tween.elem[ tween.prop ];
|
6183
6211
|
}
|
6184
6212
|
|
6185
|
-
//
|
6186
|
-
// attempt a parseFloat and fallback to a string if the parse fails
|
6187
|
-
//
|
6188
|
-
// complex values such as "rotate(1rad)" are returned as
|
6213
|
+
// Passing an empty string as a 3rd parameter to .css will automatically
|
6214
|
+
// attempt a parseFloat and fallback to a string if the parse fails.
|
6215
|
+
// Simple values such as "10px" are parsed to Float;
|
6216
|
+
// complex values such as "rotate(1rad)" are returned as-is.
|
6189
6217
|
result = jQuery.css( tween.elem, tween.prop, "" );
|
6190
6218
|
// Empty strings, null, undefined and "auto" are converted to 0.
|
6191
6219
|
return !result || result === "auto" ? 0 : result;
|
6192
6220
|
},
|
6193
6221
|
set: function( tween ) {
|
6194
|
-
//
|
6195
|
-
//
|
6222
|
+
// Use step hook for back compat.
|
6223
|
+
// Use cssHook if its there.
|
6224
|
+
// Use .style if available and use plain properties where available.
|
6196
6225
|
if ( jQuery.fx.step[ tween.prop ] ) {
|
6197
6226
|
jQuery.fx.step[ tween.prop ]( tween );
|
6198
6227
|
} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
|
@@ -6206,7 +6235,6 @@ Tween.propHooks = {
|
|
6206
6235
|
|
6207
6236
|
// Support: IE9
|
6208
6237
|
// Panic based approach to setting things on disconnected nodes
|
6209
|
-
|
6210
6238
|
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
|
6211
6239
|
set: function( tween ) {
|
6212
6240
|
if ( tween.elem.nodeType && tween.elem.parentNode ) {
|
@@ -6262,16 +6290,16 @@ var
|
|
6262
6290
|
start = +target || 1;
|
6263
6291
|
|
6264
6292
|
do {
|
6265
|
-
// If previous iteration zeroed out, double until we get *something
|
6266
|
-
// Use
|
6293
|
+
// If previous iteration zeroed out, double until we get *something*.
|
6294
|
+
// Use string for doubling so we don't accidentally see scale as unchanged below
|
6267
6295
|
scale = scale || ".5";
|
6268
6296
|
|
6269
6297
|
// Adjust and apply
|
6270
6298
|
start = start / scale;
|
6271
6299
|
jQuery.style( tween.elem, prop, start + unit );
|
6272
6300
|
|
6273
|
-
// Update scale, tolerating zero or NaN from tween.cur()
|
6274
|
-
//
|
6301
|
+
// Update scale, tolerating zero or NaN from tween.cur(),
|
6302
|
+
// break the loop if scale is unchanged or perfect, or if we've just had enough
|
6275
6303
|
} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
|
6276
6304
|
}
|
6277
6305
|
|
@@ -6303,8 +6331,8 @@ function genFx( type, includeWidth ) {
|
|
6303
6331
|
i = 0,
|
6304
6332
|
attrs = { height: type };
|
6305
6333
|
|
6306
|
-
//
|
6307
|
-
//
|
6334
|
+
// If we include width, step value is 1 to do all cssExpand values,
|
6335
|
+
// otherwise step value is 2 to skip over Left and Right
|
6308
6336
|
includeWidth = includeWidth ? 1 : 0;
|
6309
6337
|
for ( ; i < 4 ; i += 2 - includeWidth ) {
|
6310
6338
|
which = cssExpand[ i ];
|
@@ -6326,7 +6354,7 @@ function createTween( value, prop, animation ) {
|
|
6326
6354
|
for ( ; index < length; index++ ) {
|
6327
6355
|
if ( (tween = collection[ index ].call( animation, prop, value )) ) {
|
6328
6356
|
|
6329
|
-
//
|
6357
|
+
// We're done with this property
|
6330
6358
|
return tween;
|
6331
6359
|
}
|
6332
6360
|
}
|
@@ -6341,7 +6369,7 @@ function defaultPrefilter( elem, props, opts ) {
|
|
6341
6369
|
hidden = elem.nodeType && isHidden( elem ),
|
6342
6370
|
dataShow = data_priv.get( elem, "fxshow" );
|
6343
6371
|
|
6344
|
-
//
|
6372
|
+
// Handle queue: false promises
|
6345
6373
|
if ( !opts.queue ) {
|
6346
6374
|
hooks = jQuery._queueHooks( elem, "fx" );
|
6347
6375
|
if ( hooks.unqueued == null ) {
|
@@ -6356,8 +6384,7 @@ function defaultPrefilter( elem, props, opts ) {
|
|
6356
6384
|
hooks.unqueued++;
|
6357
6385
|
|
6358
6386
|
anim.always(function() {
|
6359
|
-
//
|
6360
|
-
// before this completes
|
6387
|
+
// Ensure the complete handler is called before this completes
|
6361
6388
|
anim.always(function() {
|
6362
6389
|
hooks.unqueued--;
|
6363
6390
|
if ( !jQuery.queue( elem, "fx" ).length ) {
|
@@ -6367,7 +6394,7 @@ function defaultPrefilter( elem, props, opts ) {
|
|
6367
6394
|
});
|
6368
6395
|
}
|
6369
6396
|
|
6370
|
-
//
|
6397
|
+
// Height/width overflow pass
|
6371
6398
|
if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
|
6372
6399
|
// Make sure that nothing sneaks out
|
6373
6400
|
// Record all 3 overflow attributes because IE9-10 do not
|
@@ -6429,7 +6456,7 @@ function defaultPrefilter( elem, props, opts ) {
|
|
6429
6456
|
dataShow = data_priv.access( elem, "fxshow", {} );
|
6430
6457
|
}
|
6431
6458
|
|
6432
|
-
//
|
6459
|
+
// Store state if its toggle - enables .stop().toggle() to "reverse"
|
6433
6460
|
if ( toggle ) {
|
6434
6461
|
dataShow.hidden = !hidden;
|
6435
6462
|
}
|
@@ -6489,8 +6516,8 @@ function propFilter( props, specialEasing ) {
|
|
6489
6516
|
value = hooks.expand( value );
|
6490
6517
|
delete props[ name ];
|
6491
6518
|
|
6492
|
-
//
|
6493
|
-
//
|
6519
|
+
// Not quite $.extend, this won't overwrite existing keys.
|
6520
|
+
// Reusing 'index' because we have the correct "name"
|
6494
6521
|
for ( index in value ) {
|
6495
6522
|
if ( !( index in props ) ) {
|
6496
6523
|
props[ index ] = value[ index ];
|
@@ -6509,7 +6536,7 @@ function Animation( elem, properties, options ) {
|
|
6509
6536
|
index = 0,
|
6510
6537
|
length = animationPrefilters.length,
|
6511
6538
|
deferred = jQuery.Deferred().always( function() {
|
6512
|
-
//
|
6539
|
+
// Don't match elem in the :animated selector
|
6513
6540
|
delete tick.elem;
|
6514
6541
|
}),
|
6515
6542
|
tick = function() {
|
@@ -6518,7 +6545,8 @@ function Animation( elem, properties, options ) {
|
|
6518
6545
|
}
|
6519
6546
|
var currentTime = fxNow || createFxNow(),
|
6520
6547
|
remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
|
6521
|
-
//
|
6548
|
+
// Support: Android 2.3
|
6549
|
+
// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
|
6522
6550
|
temp = remaining / animation.duration || 0,
|
6523
6551
|
percent = 1 - temp,
|
6524
6552
|
index = 0,
|
@@ -6554,7 +6582,7 @@ function Animation( elem, properties, options ) {
|
|
6554
6582
|
},
|
6555
6583
|
stop: function( gotoEnd ) {
|
6556
6584
|
var index = 0,
|
6557
|
-
//
|
6585
|
+
// If we are going to the end, we want to run all the tweens
|
6558
6586
|
// otherwise we skip this part
|
6559
6587
|
length = gotoEnd ? animation.tweens.length : 0;
|
6560
6588
|
if ( stopped ) {
|
@@ -6565,8 +6593,7 @@ function Animation( elem, properties, options ) {
|
|
6565
6593
|
animation.tweens[ index ].run( 1 );
|
6566
6594
|
}
|
6567
6595
|
|
6568
|
-
//
|
6569
|
-
// otherwise, reject
|
6596
|
+
// Resolve when we played the last frame; otherwise, reject
|
6570
6597
|
if ( gotoEnd ) {
|
6571
6598
|
deferred.resolveWith( elem, [ animation, gotoEnd ] );
|
6572
6599
|
} else {
|
@@ -6648,7 +6675,7 @@ jQuery.speed = function( speed, easing, fn ) {
|
|
6648
6675
|
opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
|
6649
6676
|
opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
|
6650
6677
|
|
6651
|
-
//
|
6678
|
+
// Normalize opt.queue - true/undefined/null -> "fx"
|
6652
6679
|
if ( opt.queue == null || opt.queue === true ) {
|
6653
6680
|
opt.queue = "fx";
|
6654
6681
|
}
|
@@ -6672,10 +6699,10 @@ jQuery.speed = function( speed, easing, fn ) {
|
|
6672
6699
|
jQuery.fn.extend({
|
6673
6700
|
fadeTo: function( speed, to, easing, callback ) {
|
6674
6701
|
|
6675
|
-
//
|
6702
|
+
// Show any hidden elements after setting opacity to 0
|
6676
6703
|
return this.filter( isHidden ).css( "opacity", 0 ).show()
|
6677
6704
|
|
6678
|
-
//
|
6705
|
+
// Animate to the value specified
|
6679
6706
|
.end().animate({ opacity: to }, speed, easing, callback );
|
6680
6707
|
},
|
6681
6708
|
animate: function( prop, speed, easing, callback ) {
|
@@ -6738,9 +6765,9 @@ jQuery.fn.extend({
|
|
6738
6765
|
}
|
6739
6766
|
}
|
6740
6767
|
|
6741
|
-
//
|
6742
|
-
//
|
6743
|
-
// but only if they were gotoEnd
|
6768
|
+
// Start the next in the queue if the last step wasn't forced.
|
6769
|
+
// Timers currently will call their complete callbacks, which
|
6770
|
+
// will dequeue but only if they were gotoEnd.
|
6744
6771
|
if ( dequeue || !gotoEnd ) {
|
6745
6772
|
jQuery.dequeue( this, type );
|
6746
6773
|
}
|
@@ -6758,17 +6785,17 @@ jQuery.fn.extend({
|
|
6758
6785
|
timers = jQuery.timers,
|
6759
6786
|
length = queue ? queue.length : 0;
|
6760
6787
|
|
6761
|
-
//
|
6788
|
+
// Enable finishing flag on private data
|
6762
6789
|
data.finish = true;
|
6763
6790
|
|
6764
|
-
//
|
6791
|
+
// Empty the queue first
|
6765
6792
|
jQuery.queue( this, type, [] );
|
6766
6793
|
|
6767
6794
|
if ( hooks && hooks.stop ) {
|
6768
6795
|
hooks.stop.call( this, true );
|
6769
6796
|
}
|
6770
6797
|
|
6771
|
-
//
|
6798
|
+
// Look for any active animations, and finish them
|
6772
6799
|
for ( index = timers.length; index--; ) {
|
6773
6800
|
if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
|
6774
6801
|
timers[ index ].anim.stop( true );
|
@@ -6776,14 +6803,14 @@ jQuery.fn.extend({
|
|
6776
6803
|
}
|
6777
6804
|
}
|
6778
6805
|
|
6779
|
-
//
|
6806
|
+
// Look for any animations in the old queue and finish them
|
6780
6807
|
for ( index = 0; index < length; index++ ) {
|
6781
6808
|
if ( queue[ index ] && queue[ index ].finish ) {
|
6782
6809
|
queue[ index ].finish.call( this );
|
6783
6810
|
}
|
6784
6811
|
}
|
6785
6812
|
|
6786
|
-
//
|
6813
|
+
// Turn off finishing flag
|
6787
6814
|
delete data.finish;
|
6788
6815
|
});
|
6789
6816
|
}
|
@@ -6886,21 +6913,21 @@ jQuery.fn.delay = function( time, type ) {
|
|
6886
6913
|
|
6887
6914
|
input.type = "checkbox";
|
6888
6915
|
|
6889
|
-
// Support: iOS
|
6890
|
-
//
|
6916
|
+
// Support: iOS<=5.1, Android<=4.2+
|
6917
|
+
// Default value for a checkbox should be "on"
|
6891
6918
|
support.checkOn = input.value !== "";
|
6892
6919
|
|
6893
|
-
//
|
6894
|
-
//
|
6920
|
+
// Support: IE<=11+
|
6921
|
+
// Must access selectedIndex to make default options select
|
6895
6922
|
support.optSelected = opt.selected;
|
6896
6923
|
|
6897
|
-
//
|
6898
|
-
//
|
6924
|
+
// Support: Android<=2.3
|
6925
|
+
// Options inside disabled selects are incorrectly marked as disabled
|
6899
6926
|
select.disabled = true;
|
6900
6927
|
support.optDisabled = !opt.disabled;
|
6901
6928
|
|
6902
|
-
//
|
6903
|
-
//
|
6929
|
+
// Support: IE<=11+
|
6930
|
+
// An input loses its value after becoming a radio
|
6904
6931
|
input = document.createElement( "input" );
|
6905
6932
|
input.value = "t";
|
6906
6933
|
input.type = "radio";
|
@@ -6997,8 +7024,6 @@ jQuery.extend({
|
|
6997
7024
|
set: function( elem, value ) {
|
6998
7025
|
if ( !support.radioValue && value === "radio" &&
|
6999
7026
|
jQuery.nodeName( elem, "input" ) ) {
|
7000
|
-
// Setting the type on a radio button after the value resets the value in IE6-9
|
7001
|
-
// Reset value to default in case type is set after value during creation
|
7002
7027
|
var val = elem.value;
|
7003
7028
|
elem.setAttribute( "type", value );
|
7004
7029
|
if ( val ) {
|
@@ -7068,7 +7093,7 @@ jQuery.extend({
|
|
7068
7093
|
var ret, hooks, notxml,
|
7069
7094
|
nType = elem.nodeType;
|
7070
7095
|
|
7071
|
-
//
|
7096
|
+
// Don't get/set properties on text, comment and attribute nodes
|
7072
7097
|
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
|
7073
7098
|
return;
|
7074
7099
|
}
|
@@ -7104,8 +7129,6 @@ jQuery.extend({
|
|
7104
7129
|
}
|
7105
7130
|
});
|
7106
7131
|
|
7107
|
-
// Support: IE9+
|
7108
|
-
// Selectedness for an option in an optgroup can be inaccurate
|
7109
7132
|
if ( !support.optSelected ) {
|
7110
7133
|
jQuery.propHooks.selected = {
|
7111
7134
|
get: function( elem ) {
|
@@ -7213,7 +7236,7 @@ jQuery.fn.extend({
|
|
7213
7236
|
}
|
7214
7237
|
}
|
7215
7238
|
|
7216
|
-
//
|
7239
|
+
// Only assign if different to avoid unneeded rendering.
|
7217
7240
|
finalValue = value ? jQuery.trim( cur ) : "";
|
7218
7241
|
if ( elem.className !== finalValue ) {
|
7219
7242
|
elem.className = finalValue;
|
@@ -7240,14 +7263,14 @@ jQuery.fn.extend({
|
|
7240
7263
|
|
7241
7264
|
return this.each(function() {
|
7242
7265
|
if ( type === "string" ) {
|
7243
|
-
//
|
7266
|
+
// Toggle individual class names
|
7244
7267
|
var className,
|
7245
7268
|
i = 0,
|
7246
7269
|
self = jQuery( this ),
|
7247
7270
|
classNames = value.match( rnotwhite ) || [];
|
7248
7271
|
|
7249
7272
|
while ( (className = classNames[ i++ ]) ) {
|
7250
|
-
//
|
7273
|
+
// Check each className given, space separated list
|
7251
7274
|
if ( self.hasClass( className ) ) {
|
7252
7275
|
self.removeClass( className );
|
7253
7276
|
} else {
|
@@ -7262,7 +7285,7 @@ jQuery.fn.extend({
|
|
7262
7285
|
data_priv.set( this, "__className__", this.className );
|
7263
7286
|
}
|
7264
7287
|
|
7265
|
-
// If the element has a class name or if we're passed
|
7288
|
+
// If the element has a class name or if we're passed `false`,
|
7266
7289
|
// then remove the whole classname (if there was one, the above saved it).
|
7267
7290
|
// Otherwise bring back whatever was previously saved (if anything),
|
7268
7291
|
// falling back to the empty string if nothing was stored.
|
@@ -7306,9 +7329,9 @@ jQuery.fn.extend({
|
|
7306
7329
|
ret = elem.value;
|
7307
7330
|
|
7308
7331
|
return typeof ret === "string" ?
|
7309
|
-
//
|
7332
|
+
// Handle most common string cases
|
7310
7333
|
ret.replace(rreturn, "") :
|
7311
|
-
//
|
7334
|
+
// Handle cases where value is null/undef or number
|
7312
7335
|
ret == null ? "" : ret;
|
7313
7336
|
}
|
7314
7337
|
|
@@ -7416,7 +7439,7 @@ jQuery.extend({
|
|
7416
7439
|
}
|
7417
7440
|
}
|
7418
7441
|
|
7419
|
-
//
|
7442
|
+
// Force browsers to behave consistently when non-matching value is set
|
7420
7443
|
if ( !optionSet ) {
|
7421
7444
|
elem.selectedIndex = -1;
|
7422
7445
|
}
|
@@ -7437,8 +7460,6 @@ jQuery.each([ "radio", "checkbox" ], function() {
|
|
7437
7460
|
};
|
7438
7461
|
if ( !support.checkOn ) {
|
7439
7462
|
jQuery.valHooks[ this ].get = function( elem ) {
|
7440
|
-
// Support: Webkit
|
7441
|
-
// "" is returned instead of "on" if a value isn't specified
|
7442
7463
|
return elem.getAttribute("value") === null ? "on" : elem.value;
|
7443
7464
|
};
|
7444
7465
|
}
|
@@ -7520,10 +7541,6 @@ jQuery.parseXML = function( data ) {
|
|
7520
7541
|
|
7521
7542
|
|
7522
7543
|
var
|
7523
|
-
// Document location
|
7524
|
-
ajaxLocParts,
|
7525
|
-
ajaxLocation,
|
7526
|
-
|
7527
7544
|
rhash = /#.*$/,
|
7528
7545
|
rts = /([?&])_=[^&]*/,
|
7529
7546
|
rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
|
@@ -7552,22 +7569,13 @@ var
|
|
7552
7569
|
transports = {},
|
7553
7570
|
|
7554
7571
|
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
|
7555
|
-
allTypes = "*/".concat("*")
|
7572
|
+
allTypes = "*/".concat( "*" ),
|
7556
7573
|
|
7557
|
-
//
|
7558
|
-
|
7559
|
-
try {
|
7560
|
-
ajaxLocation = location.href;
|
7561
|
-
} catch( e ) {
|
7562
|
-
// Use the href attribute of an A element
|
7563
|
-
// since IE will modify it given document.location
|
7564
|
-
ajaxLocation = document.createElement( "a" );
|
7565
|
-
ajaxLocation.href = "";
|
7566
|
-
ajaxLocation = ajaxLocation.href;
|
7567
|
-
}
|
7574
|
+
// Document location
|
7575
|
+
ajaxLocation = window.location.href,
|
7568
7576
|
|
7569
|
-
// Segment location into parts
|
7570
|
-
ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
|
7577
|
+
// Segment location into parts
|
7578
|
+
ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
|
7571
7579
|
|
7572
7580
|
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
|
7573
7581
|
function addToPrefiltersOrTransports( structure ) {
|
@@ -8046,7 +8054,8 @@ jQuery.extend({
|
|
8046
8054
|
}
|
8047
8055
|
|
8048
8056
|
// We can fire global events as of now if asked to
|
8049
|
-
|
8057
|
+
// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
|
8058
|
+
fireGlobals = jQuery.event && s.global;
|
8050
8059
|
|
8051
8060
|
// Watch for a new set of requests
|
8052
8061
|
if ( fireGlobals && jQuery.active++ === 0 ) {
|
@@ -8119,7 +8128,7 @@ jQuery.extend({
|
|
8119
8128
|
return jqXHR.abort();
|
8120
8129
|
}
|
8121
8130
|
|
8122
|
-
//
|
8131
|
+
// Aborting is no longer a cancellation
|
8123
8132
|
strAbort = "abort";
|
8124
8133
|
|
8125
8134
|
// Install callbacks on deferreds
|
@@ -8231,8 +8240,7 @@ jQuery.extend({
|
|
8231
8240
|
isSuccess = !error;
|
8232
8241
|
}
|
8233
8242
|
} else {
|
8234
|
-
//
|
8235
|
-
// then normalize statusText and status for non-aborts
|
8243
|
+
// Extract error from statusText and normalize for non-aborts
|
8236
8244
|
error = statusText;
|
8237
8245
|
if ( status || !statusText ) {
|
8238
8246
|
statusText = "error";
|
@@ -8288,7 +8296,7 @@ jQuery.extend({
|
|
8288
8296
|
|
8289
8297
|
jQuery.each( [ "get", "post" ], function( i, method ) {
|
8290
8298
|
jQuery[ method ] = function( url, data, callback, type ) {
|
8291
|
-
//
|
8299
|
+
// Shift arguments if data argument was omitted
|
8292
8300
|
if ( jQuery.isFunction( data ) ) {
|
8293
8301
|
type = type || callback;
|
8294
8302
|
callback = data;
|
@@ -8305,13 +8313,6 @@ jQuery.each( [ "get", "post" ], function( i, method ) {
|
|
8305
8313
|
};
|
8306
8314
|
});
|
8307
8315
|
|
8308
|
-
// Attach a bunch of functions for handling common AJAX events
|
8309
|
-
jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
|
8310
|
-
jQuery.fn[ type ] = function( fn ) {
|
8311
|
-
return this.on( type, fn );
|
8312
|
-
};
|
8313
|
-
});
|
8314
|
-
|
8315
8316
|
|
8316
8317
|
jQuery._evalUrl = function( url ) {
|
8317
8318
|
return jQuery.ajax({
|
@@ -8529,8 +8530,9 @@ var xhrId = 0,
|
|
8529
8530
|
|
8530
8531
|
// Support: IE9
|
8531
8532
|
// Open requests must be manually aborted on unload (#5280)
|
8532
|
-
|
8533
|
-
|
8533
|
+
// See https://support.microsoft.com/kb/2856746 for more info
|
8534
|
+
if ( window.attachEvent ) {
|
8535
|
+
window.attachEvent( "onunload", function() {
|
8534
8536
|
for ( var key in xhrCallbacks ) {
|
8535
8537
|
xhrCallbacks[ key ]();
|
8536
8538
|
}
|
@@ -8883,6 +8885,16 @@ jQuery.fn.load = function( url, params, callback ) {
|
|
8883
8885
|
|
8884
8886
|
|
8885
8887
|
|
8888
|
+
// Attach a bunch of functions for handling common AJAX events
|
8889
|
+
jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
|
8890
|
+
jQuery.fn[ type ] = function( fn ) {
|
8891
|
+
return this.on( type, fn );
|
8892
|
+
};
|
8893
|
+
});
|
8894
|
+
|
8895
|
+
|
8896
|
+
|
8897
|
+
|
8886
8898
|
jQuery.expr.filters.animated = function( elem ) {
|
8887
8899
|
return jQuery.grep(jQuery.timers, function( fn ) {
|
8888
8900
|
return elem === fn.elem;
|
@@ -8919,7 +8931,8 @@ jQuery.offset = {
|
|
8919
8931
|
calculatePosition = ( position === "absolute" || position === "fixed" ) &&
|
8920
8932
|
( curCSSTop + curCSSLeft ).indexOf("auto") > -1;
|
8921
8933
|
|
8922
|
-
// Need to be able to calculate position if either
|
8934
|
+
// Need to be able to calculate position if either
|
8935
|
+
// top or left is auto and position is either absolute or fixed
|
8923
8936
|
if ( calculatePosition ) {
|
8924
8937
|
curPosition = curElem.position();
|
8925
8938
|
curTop = curPosition.top;
|
@@ -8976,8 +8989,8 @@ jQuery.fn.extend({
|
|
8976
8989
|
return box;
|
8977
8990
|
}
|
8978
8991
|
|
8992
|
+
// Support: BlackBerry 5, iOS 3 (original iPhone)
|
8979
8993
|
// If we don't have gBCR, just use 0,0 rather than error
|
8980
|
-
// BlackBerry 5, iOS 3 (original iPhone)
|
8981
8994
|
if ( typeof elem.getBoundingClientRect !== strundefined ) {
|
8982
8995
|
box = elem.getBoundingClientRect();
|
8983
8996
|
}
|
@@ -8999,7 +9012,7 @@ jQuery.fn.extend({
|
|
8999
9012
|
|
9000
9013
|
// Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent
|
9001
9014
|
if ( jQuery.css( elem, "position" ) === "fixed" ) {
|
9002
|
-
//
|
9015
|
+
// Assume getBoundingClientRect is there when computed position is fixed
|
9003
9016
|
offset = elem.getBoundingClientRect();
|
9004
9017
|
|
9005
9018
|
} else {
|
@@ -9062,16 +9075,18 @@ jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function(
|
|
9062
9075
|
};
|
9063
9076
|
});
|
9064
9077
|
|
9078
|
+
// Support: Safari<7+, Chrome<37+
|
9065
9079
|
// Add the top/left cssHooks using jQuery.fn.position
|
9066
9080
|
// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
|
9067
|
-
//
|
9068
|
-
//
|
9081
|
+
// Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280
|
9082
|
+
// getComputedStyle returns percent when specified for top/left/bottom/right;
|
9083
|
+
// rather than make the css module depend on the offset module, just check for it here
|
9069
9084
|
jQuery.each( [ "top", "left" ], function( i, prop ) {
|
9070
9085
|
jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
|
9071
9086
|
function( elem, computed ) {
|
9072
9087
|
if ( computed ) {
|
9073
9088
|
computed = curCSS( elem, prop );
|
9074
|
-
//
|
9089
|
+
// If curCSS returns percentage, fallback to offset
|
9075
9090
|
return rnumnonpx.test( computed ) ?
|
9076
9091
|
jQuery( elem ).position()[ prop ] + "px" :
|
9077
9092
|
computed;
|
@@ -9084,7 +9099,7 @@ jQuery.each( [ "top", "left" ], function( i, prop ) {
|
|
9084
9099
|
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
|
9085
9100
|
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
9086
9101
|
jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
|
9087
|
-
//
|
9102
|
+
// Margin is only for outerHeight, outerWidth
|
9088
9103
|
jQuery.fn[ funcName ] = function( margin, value ) {
|
9089
9104
|
var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
|
9090
9105
|
extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
|
@@ -9175,8 +9190,8 @@ jQuery.noConflict = function( deep ) {
|
|
9175
9190
|
return jQuery;
|
9176
9191
|
};
|
9177
9192
|
|
9178
|
-
// Expose jQuery and $ identifiers, even in
|
9179
|
-
//
|
9193
|
+
// Expose jQuery and $ identifiers, even in AMD
|
9194
|
+
// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
|
9180
9195
|
// and CommonJS for browser emulators (#13566)
|
9181
9196
|
if ( typeof noGlobal === strundefined ) {
|
9182
9197
|
window.jQuery = window.$ = jQuery;
|