|
1 |
/*!
|
|
2 |
* jQuery JavaScript Library v3.3.1
|
|
3 |
* https://jquery.com/
|
|
4 |
*
|
|
5 |
* Includes Sizzle.js
|
|
6 |
* https://sizzlejs.com/
|
|
7 |
*
|
|
8 |
* Copyright JS Foundation and other contributors
|
|
9 |
* Released under the MIT license
|
|
10 |
* https://jquery.org/license
|
|
11 |
*
|
|
12 |
* Date: 2018-01-20T17:24Z
|
|
13 |
*/
|
|
14 |
( function( global, factory ) {
|
|
15 |
|
|
16 |
"use strict";
|
|
17 |
|
|
18 |
if ( typeof module === "object" && typeof module.exports === "object" ) {
|
|
19 |
|
|
20 |
// For CommonJS and CommonJS-like environments where a proper `window`
|
|
21 |
// is present, execute the factory and get jQuery.
|
|
22 |
// For environments that do not have a `window` with a `document`
|
|
23 |
// (such as Node.js), expose a factory as module.exports.
|
|
24 |
// This accentuates the need for the creation of a real `window`.
|
|
25 |
// e.g. var jQuery = require("jquery")(window);
|
|
26 |
// See ticket #14549 for more info.
|
|
27 |
module.exports = global.document ?
|
|
28 |
factory( global, true ) :
|
|
29 |
function( w ) {
|
|
30 |
if ( !w.document ) {
|
|
31 |
throw new Error( "jQuery requires a window with a document" );
|
|
32 |
}
|
|
33 |
return factory( w );
|
|
34 |
};
|
|
35 |
} else {
|
|
36 |
factory( global );
|
|
37 |
}
|
|
38 |
|
|
39 |
// Pass this if window is not defined yet
|
|
40 |
} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
|
|
41 |
|
|
42 |
// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
|
|
43 |
// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
|
|
44 |
// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
|
|
45 |
// enough that all such attempts are guarded in a try block.
|
|
46 |
"use strict";
|
|
47 |
|
|
48 |
var arr = [];
|
|
49 |
|
|
50 |
var document = window.document;
|
|
51 |
|
|
52 |
var getProto = Object.getPrototypeOf;
|
|
53 |
|
|
54 |
var slice = arr.slice;
|
|
55 |
|
|
56 |
var concat = arr.concat;
|
|
57 |
|
|
58 |
var push = arr.push;
|
|
59 |
|
|
60 |
var indexOf = arr.indexOf;
|
|
61 |
|
|
62 |
var class2type = {};
|
|
63 |
|
|
64 |
var toString = class2type.toString;
|
|
65 |
|
|
66 |
var hasOwn = class2type.hasOwnProperty;
|
|
67 |
|
|
68 |
var fnToString = hasOwn.toString;
|
|
69 |
|
|
70 |
var ObjectFunctionString = fnToString.call( Object );
|
|
71 |
|
|
72 |
var support = {};
|
|
73 |
|
|
74 |
var isFunction = function isFunction( obj ) {
|
|
75 |
|
|
76 |
// Support: Chrome <=57, Firefox <=52
|
|
77 |
// In some browsers, typeof returns "function" for HTML <object> elements
|
|
78 |
// (i.e., `typeof document.createElement( "object" ) === "function"`).
|
|
79 |
// We don't want to classify *any* DOM node as a function.
|
|
80 |
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
|
81 |
};
|
|
82 |
|
|
83 |
|
|
84 |
var isWindow = function isWindow( obj ) {
|
|
85 |
return obj != null && obj === obj.window;
|
|
86 |
};
|
|
87 |
|
|
88 |
|
|
89 |
|
|
90 |
|
|
91 |
var preservedScriptAttributes = {
|
|
92 |
type: true,
|
|
93 |
src: true,
|
|
94 |
noModule: true
|
|
95 |
};
|
|
96 |
|
|
97 |
function DOMEval( code, doc, node ) {
|
|
98 |
doc = doc || document;
|
|
99 |
|
|
100 |
var i,
|
|
101 |
script = doc.createElement( "script" );
|
|
102 |
|
|
103 |
script.text = code;
|
|
104 |
if ( node ) {
|
|
105 |
for ( i in preservedScriptAttributes ) {
|
|
106 |
if ( node[ i ] ) {
|
|
107 |
script[ i ] = node[ i ];
|
|
108 |
}
|
|
109 |
}
|
|
110 |
}
|
|
111 |
doc.head.appendChild( script ).parentNode.removeChild( script );
|
|
112 |
}
|
|
113 |
|
|
114 |
|
|
115 |
function toType( obj ) {
|
|
116 |
if ( obj == null ) {
|
|
117 |
return obj + "";
|
|
118 |
}
|
|
119 |
|
|
120 |
// Support: Android <=2.3 only (functionish RegExp)
|
|
121 |
return typeof obj === "object" || typeof obj === "function" ?
|
|
122 |
class2type[ toString.call( obj ) ] || "object" :
|
|
123 |
typeof obj;
|
|
124 |
}
|
|
125 |
/* global Symbol */
|
|
126 |
// Defining this global in .eslintrc.json would create a danger of using the global
|
|
127 |
// unguarded in another place, it seems safer to define global only for this module
|
|
128 |
|
|
129 |
|
|
130 |
|
|
131 |
var
|
|
132 |
version = "3.3.1",
|
|
133 |
|
|
134 |
// Define a local copy of jQuery
|
|
135 |
jQuery = function( selector, context ) {
|
|
136 |
|
|
137 |
// The jQuery object is actually just the init constructor 'enhanced'
|
|
138 |
// Need init if jQuery is called (just allow error to be thrown if not included)
|
|
139 |
return new jQuery.fn.init( selector, context );
|
|
140 |
},
|
|
141 |
|
|
142 |
// Support: Android <=4.0 only
|
|
143 |
// Make sure we trim BOM and NBSP
|
|
144 |
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
|
|
145 |
|
|
146 |
jQuery.fn = jQuery.prototype = {
|
|
147 |
|
|
148 |
// The current version of jQuery being used
|
|
149 |
jquery: version,
|
|
150 |
|
|
151 |
constructor: jQuery,
|
|
152 |
|
|
153 |
// The default length of a jQuery object is 0
|
|
154 |
length: 0,
|
|
155 |
|
|
156 |
toArray: function() {
|
|
157 |
return slice.call( this );
|
|
158 |
},
|
|
159 |
|
|
160 |
// Get the Nth element in the matched element set OR
|
|
161 |
// Get the whole matched element set as a clean array
|
|
162 |
get: function( num ) {
|
|
163 |
|
|
164 |
// Return all the elements in a clean array
|
|
165 |
if ( num == null ) {
|
|
166 |
return slice.call( this );
|
|
167 |
}
|
|
168 |
|
|
169 |
// Return just the one element from the set
|
|
170 |
return num < 0 ? this[ num + this.length ] : this[ num ];
|
|
171 |
},
|
|
172 |
|
|
173 |
// Take an array of elements and push it onto the stack
|
|
174 |
// (returning the new matched element set)
|
|
175 |
pushStack: function( elems ) {
|
|
176 |
|
|
177 |
// Build a new jQuery matched element set
|
|
178 |
var ret = jQuery.merge( this.constructor(), elems );
|
|
179 |
|
|
180 |
// Add the old object onto the stack (as a reference)
|
|
181 |
ret.prevObject = this;
|
|
182 |
|
|
183 |
// Return the newly-formed element set
|
|
184 |
return ret;
|
|
185 |
},
|
|
186 |
|
|
187 |
// Execute a callback for every element in the matched set.
|
|
188 |
each: function( callback ) {
|
|
189 |
return jQuery.each( this, callback );
|
|
190 |
},
|
|
191 |
|
|
192 |
map: function( callback ) {
|
|
193 |
return this.pushStack( jQuery.map( this, function( elem, i ) {
|
|
194 |
return callback.call( elem, i, elem );
|
|
195 |
} ) );
|
|
196 |
},
|
|
197 |
|
|
198 |
slice: function() {
|
|
199 |
return this.pushStack( slice.apply( this, arguments ) );
|
|
200 |
},
|
|
201 |
|
|
202 |
first: function() {
|
|
203 |
return this.eq( 0 );
|
|
204 |
},
|
|
205 |
|
|
206 |
last: function() {
|
|
207 |
return this.eq( -1 );
|
|
208 |
},
|
|
209 |
|
|
210 |
eq: function( i ) {
|
|
211 |
var len = this.length,
|
|
212 |
j = +i + ( i < 0 ? len : 0 );
|
|
213 |
return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
|
|
214 |
},
|
|
215 |
|
|
216 |
end: function() {
|
|
217 |
return this.prevObject || this.constructor();
|
|
218 |
},
|
|
219 |
|
|
220 |
// For internal use only.
|
|
221 |
// Behaves like an Array's method, not like a jQuery method.
|
|
222 |
push: push,
|
|
223 |
sort: arr.sort,
|
|
224 |
splice: arr.splice
|
|
225 |
};
|
|
226 |
|
|
227 |
jQuery.extend = jQuery.fn.extend = function() {
|
|
228 |
var options, name, src, copy, copyIsArray, clone,
|
|
229 |
target = arguments[ 0 ] || {},
|
|
230 |
i = 1,
|
|
231 |
length = arguments.length,
|
|
232 |
deep = false;
|
|
233 |
|
|
234 |
// Handle a deep copy situation
|
|
235 |
if ( typeof target === "boolean" ) {
|
|
236 |
deep = target;
|
|
237 |
|
|
238 |
// Skip the boolean and the target
|
|
239 |
target = arguments[ i ] || {};
|
|
240 |
i++;
|
|
241 |
}
|
|
242 |
|
|
243 |
// Handle case when target is a string or something (possible in deep copy)
|
|
244 |
if ( typeof target !== "object" && !isFunction( target ) ) {
|
|
245 |
target = {};
|
|
246 |
}
|
|
247 |
|
|
248 |
// Extend jQuery itself if only one argument is passed
|
|
249 |
if ( i === length ) {
|
|
250 |
target = this;
|
|
251 |
i--;
|
|
252 |
}
|
|
253 |
|
|
254 |
for ( ; i < length; i++ ) {
|
|
255 |
|
|
256 |
// Only deal with non-null/undefined values
|
|
257 |
if ( ( options = arguments[ i ] ) != null ) {
|
|
258 |
|
|
259 |
// Extend the base object
|
|
260 |
for ( name in options ) {
|
|
261 |
src = target[ name ];
|
|
262 |
copy = options[ name ];
|
|
263 |
|
|
264 |
// Prevent never-ending loop
|
|
265 |
if ( target === copy ) {
|
|
266 |
continue;
|
|
267 |
}
|
|
268 |
|
|
269 |
// Recurse if we're merging plain objects or arrays
|
|
270 |
if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
|
|
271 |
( copyIsArray = Array.isArray( copy ) ) ) ) {
|
|
272 |
|
|
273 |
if ( copyIsArray ) {
|
|
274 |
copyIsArray = false;
|
|
275 |
clone = src && Array.isArray( src ) ? src : [];
|
|
276 |
|
|
277 |
} else {
|
|
278 |
clone = src && jQuery.isPlainObject( src ) ? src : {};
|
|
279 |
}
|
|
280 |
|
|
281 |
// Never move original objects, clone them
|
|
282 |
target[ name ] = jQuery.extend( deep, clone, copy );
|
|
283 |
|
|
284 |
// Don't bring in undefined values
|
|
285 |
} else if ( copy !== undefined ) {
|
|
286 |
target[ name ] = copy;
|
|
287 |
}
|
|
288 |
}
|
|
289 |
}
|
|
290 |
}
|
|
291 |
|
|
292 |
// Return the modified object
|
|
293 |
return target;
|
|
294 |
};
|
|
295 |
|
|
296 |
jQuery.extend( {
|
|
297 |
|
|
298 |
// Unique for each copy of jQuery on the page
|
|
299 |
expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
|
|
300 |
|
|
301 |
// Assume jQuery is ready without the ready module
|
|
302 |
isReady: true,
|
|
303 |
|
|
304 |
error: function( msg ) {
|
|
305 |
throw new Error( msg );
|
|
306 |
},
|
|
307 |
|
|
308 |
noop: function() {},
|
|
309 |
|
|
310 |
isPlainObject: function( obj ) {
|
|
311 |
var proto, Ctor;
|
|
312 |
|
|
313 |
// Detect obvious negatives
|
|
314 |
// Use toString instead of jQuery.type to catch host objects
|
|
315 |
if ( !obj || toString.call( obj ) !== "[object Object]" ) {
|
|
316 |
return false;
|
|
317 |
}
|
|
318 |
|
|
319 |
proto = getProto( obj );
|
|
320 |
|
|
321 |
// Objects with no prototype (e.g., `Object.create( null )`) are plain
|
|
322 |
if ( !proto ) {
|
|
323 |
return true;
|
|
324 |
}
|
|
325 |
|
|
326 |
// Objects with prototype are plain iff they were constructed by a global Object function
|
|
327 |
Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
|
|
328 |
return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
|
|
329 |
},
|
|
330 |
|
|
331 |
isEmptyObject: function( obj ) {
|
|
332 |
|
|
333 |
/* eslint-disable no-unused-vars */
|
|
334 |
// See https://github.com/eslint/eslint/issues/6125
|
|
335 |
var name;
|
|
336 |
|
|
337 |
for ( name in obj ) {
|
|
338 |
return false;
|
|
339 |
}
|
|
340 |
return true;
|
|
341 |
},
|
|
342 |
|
|
343 |
// Evaluates a script in a global context
|
|
344 |
globalEval: function( code ) {
|
|
345 |
DOMEval( code );
|
|
346 |
},
|
|
347 |
|
|
348 |
each: function( obj, callback ) {
|
|
349 |
var length, i = 0;
|
|
350 |
|
|
351 |
if ( isArrayLike( obj ) ) {
|
|
352 |
length = obj.length;
|
|
353 |
for ( ; i < length; i++ ) {
|
|
354 |
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
|
|
355 |
break;
|
|
356 |
}
|
|
357 |
}
|
|
358 |
} else {
|
|
359 |
for ( i in obj ) {
|
|
360 |
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
|
|
361 |
break;
|
|
362 |
}
|
|
363 |
}
|
|
364 |
}
|
|
365 |
|
|
366 |
return obj;
|
|
367 |
},
|
|
368 |
|
|
369 |
// Support: Android <=4.0 only
|
|
370 |
trim: function( text ) {
|
|
371 |
return text == null ?
|
|
372 |
"" :
|
|
373 |
( text + "" ).replace( rtrim, "" );
|
|
374 |
},
|
|
375 |
|
|
376 |
// results is for internal usage only
|
|
377 |
makeArray: function( arr, results ) {
|
|
378 |
var ret = results || [];
|
|
379 |
|
|
380 |
if ( arr != null ) {
|
|
381 |
if ( isArrayLike( Object( arr ) ) ) {
|
|
382 |
jQuery.merge( ret,
|
|
383 |
typeof arr === "string" ?
|
|
384 |
[ arr ] : arr
|
|
385 |
);
|
|
386 |
} else {
|
|
387 |
push.call( ret, arr );
|
|
388 |
}
|
|
389 |
}
|
|
390 |
|
|
391 |
return ret;
|
|
392 |
},
|
|
393 |
|
|
394 |
inArray: function( elem, arr, i ) {
|
|
395 |
return arr == null ? -1 : indexOf.call( arr, elem, i );
|
|
396 |
},
|
|
397 |
|
|
398 |
// Support: Android <=4.0 only, PhantomJS 1 only
|
|
399 |
// push.apply(_, arraylike) throws on ancient WebKit
|
|
400 |
merge: function( first, second ) {
|
|
401 |
var len = +second.length,
|
|
402 |
j = 0,
|
|
403 |
i = first.length;
|
|
404 |
|
|
405 |
for ( ; j < len; j++ ) {
|
|
406 |
first[ i++ ] = second[ j ];
|
|
407 |
}
|
|
408 |
|
|
409 |
first.length = i;
|
|
410 |
|
|
411 |
return first;
|
|
412 |
},
|
|
413 |
|
|
414 |
grep: function( elems, callback, invert ) {
|
|
415 |
var callbackInverse,
|
|
416 |
matches = [],
|
|
417 |
i = 0,
|
|
418 |
length = elems.length,
|
|
419 |
callbackExpect = !invert;
|
|
420 |
|
|
421 |
// Go through the array, only saving the items
|
|
422 |
// that pass the validator function
|
|
423 |
for ( ; i < length; i++ ) {
|
|
424 |
callbackInverse = !callback( elems[ i ], i );
|
|
425 |
if ( callbackInverse !== callbackExpect ) {
|
|
426 |
matches.push( elems[ i ] );
|
|
427 |
}
|
|
428 |
}
|
|
429 |
|
|
430 |
return matches;
|
|
431 |
},
|
|
432 |
|
|
433 |
// arg is for internal usage only
|
|
434 |
map: function( elems, callback, arg ) {
|
|
435 |
var length, value,
|
|
436 |
i = 0,
|
|
437 |
ret = [];
|
|
438 |
|
|
439 |
// Go through the array, translating each of the items to their new values
|
|
440 |
if ( isArrayLike( elems ) ) {
|
|
441 |
length = elems.length;
|
|
442 |
for ( ; i < length; i++ ) {
|
|
443 |
value = callback( elems[ i ], i, arg );
|
|
444 |
|
|
445 |
if ( value != null ) {
|
|
446 |
ret.push( value );
|
|
447 |
}
|
|
448 |
}
|
|
449 |
|
|
450 |
// Go through every key on the object,
|
|
451 |
} else {
|
|
452 |
for ( i in elems ) {
|
|
453 |
value = callback( elems[ i ], i, arg );
|
|
454 |
|
|
455 |
if ( value != null ) {
|
|
456 |
ret.push( value );
|
|
457 |
}
|
|
458 |
}
|
|
459 |
}
|
|
460 |
|
|
461 |
// Flatten any nested arrays
|
|
462 |
return concat.apply( [], ret );
|
|
463 |
},
|
|
464 |
|
|
465 |
// A global GUID counter for objects
|
|
466 |
guid: 1,
|
|
467 |
|
|
468 |
// jQuery.support is not used in Core but other projects attach their
|
|
469 |
// properties to it so it needs to exist.
|
|
470 |
support: support
|
|
471 |
} );
|
|
472 |
|
|
473 |
if ( typeof Symbol === "function" ) {
|
|
474 |
jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
|
|
475 |
}
|
|
476 |
|
|
477 |
// Populate the class2type map
|
|
478 |
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
|
|
479 |
function( i, name ) {
|
|
480 |
class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
|
481 |
} );
|
|
482 |
|
|
483 |
function isArrayLike( obj ) {
|
|
484 |
|
|
485 |
// Support: real iOS 8.2 only (not reproducible in simulator)
|
|
486 |
// `in` check used to prevent JIT error (gh-2145)
|
|
487 |
// hasOwn isn't used here due to false negatives
|
|
488 |
// regarding Nodelist length in IE
|
|
489 |
var length = !!obj && "length" in obj && obj.length,
|
|
490 |
type = toType( obj );
|
|
491 |
|
|
492 |
if ( isFunction( obj ) || isWindow( obj ) ) {
|
|
493 |
return false;
|
|
494 |
}
|
|
495 |
|
|
496 |
return type === "array" || length === 0 ||
|
|
497 |
typeof length === "number" && length > 0 && ( length - 1 ) in obj;
|
|
498 |
}
|
|
499 |
var Sizzle =
|
|
500 |
/*!
|
|
501 |
* Sizzle CSS Selector Engine v2.3.3
|
|
502 |
* https://sizzlejs.com/
|
|
503 |
*
|
|
504 |
* Copyright jQuery Foundation and other contributors
|
|
505 |
* Released under the MIT license
|
|
506 |
* http://jquery.org/license
|
|
507 |
*
|
|
508 |
* Date: 2016-08-08
|
|
509 |
*/
|
|
510 |
(function( window ) {
|
|
511 |
|
|
512 |
var i,
|
|
513 |
support,
|
|
514 |
Expr,
|
|
515 |
getText,
|
|
516 |
isXML,
|
|
517 |
tokenize,
|
|
518 |
compile,
|
|
519 |
select,
|
|
520 |
outermostContext,
|
|
521 |
sortInput,
|
|
522 |
hasDuplicate,
|
|
523 |
|
|
524 |
// Local document vars
|
|
525 |
setDocument,
|
|
526 |
document,
|
|
527 |
docElem,
|
|
528 |
documentIsHTML,
|
|
529 |
rbuggyQSA,
|
|
530 |
rbuggyMatches,
|
|
531 |
matches,
|
|
532 |
contains,
|
|
533 |
|
|
534 |
// Instance-specific data
|
|
535 |
expando = "sizzle" + 1 * new Date(),
|
|
536 |
preferredDoc = window.document,
|
|
537 |
dirruns = 0,
|
|
538 |
done = 0,
|
|
539 |
classCache = createCache(),
|
|
540 |
tokenCache = createCache(),
|
|
541 |
compilerCache = createCache(),
|
|
542 |
sortOrder = function( a, b ) {
|
|
543 |
if ( a === b ) {
|
|
544 |
hasDuplicate = true;
|
|
545 |
}
|
|
546 |
return 0;
|
|
547 |
},
|
|
548 |
|
|
549 |
// Instance methods
|
|
550 |
hasOwn = ({}).hasOwnProperty,
|
|
551 |
arr = [],
|
|
552 |
pop = arr.pop,
|
|
553 |
push_native = arr.push,
|
|
554 |
push = arr.push,
|
|
555 |
slice = arr.slice,
|
|
556 |
// Use a stripped-down indexOf as it's faster than native
|
|
557 |
// https://jsperf.com/thor-indexof-vs-for/5
|
|
558 |
indexOf = function( list, elem ) {
|
|
559 |
var i = 0,
|
|
560 |
len = list.length;
|
|
561 |
for ( ; i < len; i++ ) {
|
|
562 |
if ( list[i] === elem ) {
|
|
563 |
return i;
|
|
564 |
}
|
|
565 |
}
|
|
566 |
return -1;
|
|
567 |
},
|
|
568 |
|
|
569 |
booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
|
|
570 |
|
|
571 |
// Regular expressions
|
|
572 |
|
|
573 |
// http://www.w3.org/TR/css3-selectors/#whitespace
|
|
574 |
whitespace = "[\\x20\\t\\r\\n\\f]",
|
|
575 |
|
|
576 |
// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
|
|
577 |
identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
|
|
578 |
|
|
579 |
// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
|
|
580 |
attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
|
|
581 |
// Operator (capture 2)
|
|
582 |
"*([*^$|!~]?=)" + whitespace +
|
|
583 |
// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
|
|
584 |
"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
|
|
585 |
"*\\]",
|
|
586 |
|
|
587 |
pseudos = ":(" + identifier + ")(?:\\((" +
|
|
588 |
// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
|
|
589 |
// 1. quoted (capture 3; capture 4 or capture 5)
|
|
590 |
"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
|
|
591 |
// 2. simple (capture 6)
|
|
592 |
"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
|
|
593 |
// 3. anything else (capture 2)
|
|
594 |
".*" +
|
|
595 |
")\\)|)",
|
|
596 |
|
|
597 |
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
|
|
598 |
rwhitespace = new RegExp( whitespace + "+", "g" ),
|
|
599 |
rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
|
|
600 |
|
|
601 |
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
|
|
602 |
rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
|
|
603 |
|
|
604 |
rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
|
|
605 |
|
|
606 |
rpseudo = new RegExp( pseudos ),
|
|
607 |
ridentifier = new RegExp( "^" + identifier + "$" ),
|
|
608 |
|
|
609 |
matchExpr = {
|
|
610 |
"ID": new RegExp( "^#(" + identifier + ")" ),
|
|
611 |
"CLASS": new RegExp( "^\\.(" + identifier + ")" ),
|
|
612 |
"TAG": new RegExp( "^(" + identifier + "|[*])" ),
|
|
613 |
"ATTR": new RegExp( "^" + attributes ),
|
|
614 |
"PSEUDO": new RegExp( "^" + pseudos ),
|
|
615 |
"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
|
|
616 |
"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
|
|
617 |
"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
|
|
618 |
"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
|
|
619 |
// For use in libraries implementing .is()
|
|
620 |
// We use this for POS matching in `select`
|
|
621 |
"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
|
|
622 |
whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
|
|
623 |
},
|
|
624 |
|
|
625 |
rinputs = /^(?:input|select|textarea|button)$/i,
|
|
626 |
rheader = /^h\d$/i,
|
|
627 |
|
|
628 |
rnative = /^[^{]+\{\s*\[native \w/,
|
|
629 |
|
|
630 |
// Easily-parseable/retrievable ID or TAG or CLASS selectors
|
|
631 |
rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
|
|
632 |
|
|
633 |
rsibling = /[+~]/,
|
|
634 |
|
|
635 |
// CSS escapes
|
|
636 |
// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
|
|
637 |
runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
|
|
638 |
funescape = function( _, escaped, escapedWhitespace ) {
|
|
639 |
var high = "0x" + escaped - 0x10000;
|
|
640 |
// NaN means non-codepoint
|
|
641 |
// Support: Firefox<24
|
|
642 |
// Workaround erroneous numeric interpretation of +"0x"
|
|
643 |
return high !== high || escapedWhitespace ?
|
|
644 |
escaped :
|
|
645 |
high < 0 ?
|
|
646 |
// BMP codepoint
|
|
647 |
String.fromCharCode( high + 0x10000 ) :
|
|
648 |
// Supplemental Plane codepoint (surrogate pair)
|
|
649 |
String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
|
|
650 |
},
|
|
651 |
|
|
652 |
// CSS string/identifier serialization
|
|
653 |
// https://drafts.csswg.org/cssom/#common-serializing-idioms
|
|
654 |
rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
|
|
655 |
fcssescape = function( ch, asCodePoint ) {
|
|
656 |
if ( asCodePoint ) {
|
|
657 |
|
|
658 |
// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
|
|
659 |
if ( ch === "\0" ) {
|
|
660 |
return "\uFFFD";
|
|
661 |
}
|
|
662 |
|
|
663 |
// Control characters and (dependent upon position) numbers get escaped as code points
|
|
664 |
return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
|
|
665 |
}
|
|
666 |
|
|
667 |
// Other potentially-special ASCII characters get backslash-escaped
|
|
668 |
return "\\" + ch;
|
|
669 |
},
|
|
670 |
|
|
671 |
// Used for iframes
|
|
672 |
// See setDocument()
|
|
673 |
// Removing the function wrapper causes a "Permission Denied"
|
|
674 |
// error in IE
|
|
675 |
unloadHandler = function() {
|
|
676 |
setDocument();
|
|
677 |
},
|
|
678 |
|
|
679 |
disabledAncestor = addCombinator(
|
|
680 |
function( elem ) {
|
|
681 |
return elem.disabled === true && ("form" in elem || "label" in elem);
|
|
682 |
},
|
|
683 |
{ dir: "parentNode", next: "legend" }
|
|
684 |
);
|
|
685 |
|
|
686 |
// Optimize for push.apply( _, NodeList )
|
|
687 |
try {
|
|
688 |
push.apply(
|
|
689 |
(arr = slice.call( preferredDoc.childNodes )),
|
|
690 |
preferredDoc.childNodes
|
|
691 |
);
|
|
692 |
// Support: Android<4.0
|
|
693 |
// Detect silently failing push.apply
|
|
694 |
arr[ preferredDoc.childNodes.length ].nodeType;
|
|
695 |
} catch ( e ) {
|
|
696 |
push = { apply: arr.length ?
|
|
697 |
|
|
698 |
// Leverage slice if possible
|
|
699 |
function( target, els ) {
|
|
700 |
push_native.apply( target, slice.call(els) );
|
|
701 |
} :
|
|
702 |
|
|
703 |
// Support: IE<9
|
|
704 |
// Otherwise append directly
|
|
705 |
function( target, els ) {
|
|
706 |
var j = target.length,
|
|
707 |
i = 0;
|
|
708 |
// Can't trust NodeList.length
|
|
709 |
while ( (target[j++] = els[i++]) ) {}
|
|
710 |
target.length = j - 1;
|
|
711 |
}
|
|
712 |
};
|
|
713 |
}
|
|
714 |
|
|
715 |
function Sizzle( selector, context, results, seed ) {
|
|
716 |
var m, i, elem, nid, match, groups, newSelector,
|
|
717 |
newContext = context && context.ownerDocument,
|
|
718 |
|
|
719 |
// nodeType defaults to 9, since context defaults to document
|
|
720 |
nodeType = context ? context.nodeType : 9;
|
|
721 |
|
|
722 |
results = results || [];
|
|
723 |
|
|
724 |
// Return early from calls with invalid selector or context
|
|
725 |
if ( typeof selector !== "string" || !selector ||
|
|
726 |
nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
|
|
727 |
|
|
728 |
return results;
|
|
729 |
}
|
|
730 |
|
|
731 |
// Try to shortcut find operations (as opposed to filters) in HTML documents
|
|
732 |
if ( !seed ) {
|
|
733 |
|
|
734 |
if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
|
|
735 |
setDocument( context );
|
|
736 |
}
|
|
737 |
context = context || document;
|
|
738 |
|
|
739 |
if ( documentIsHTML ) {
|
|
740 |
|
|
741 |
// If the selector is sufficiently simple, try using a "get*By*" DOM method
|
|
742 |
// (excepting DocumentFragment context, where the methods don't exist)
|
|
743 |
if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
|
|
744 |
|
|
745 |
// ID selector
|
|
746 |
if ( (m = match[1]) ) {
|
|
747 |
|
|
748 |
// Document context
|
|
749 |
if ( nodeType === 9 ) {
|
|
750 |
if ( (elem = context.getElementById( m )) ) {
|
|
751 |
|
|
752 |
// Support: IE, Opera, Webkit
|
|
753 |
// TODO: identify versions
|
|
754 |
// getElementById can match elements by name instead of ID
|
|
755 |
if ( elem.id === m ) {
|
|
756 |
results.push( elem );
|
|
757 |
return results;
|
|
758 |
}
|
|
759 |
} else {
|
|
760 |
return results;
|
|
761 |
}
|
|
762 |
|
|
763 |
// Element context
|
|
764 |
} else {
|
|
765 |
|
|
766 |
// Support: IE, Opera, Webkit
|
|
767 |
// TODO: identify versions
|
|
768 |
// getElementById can match elements by name instead of ID
|
|
769 |
if ( newContext && (elem = newContext.getElementById( m )) &&
|
|
770 |
contains( context, elem ) &&
|
|
771 |
elem.id === m ) {
|
|
772 |
|
|
773 |
results.push( elem );
|
|
774 |
return results;
|
|
775 |
}
|
|
776 |
}
|
|
777 |
|
|
778 |
// Type selector
|
|
779 |
} else if ( match[2] ) {
|
|
780 |
push.apply( results, context.getElementsByTagName( selector ) );
|
|
781 |
return results;
|
|
782 |
|
|
783 |
// Class selector
|
|
784 |
} else if ( (m = match[3]) && support.getElementsByClassName &&
|
|
785 |
context.getElementsByClassName ) {
|
|
786 |
|
|
787 |
push.apply( results, context.getElementsByClassName( m ) );
|
|
788 |
return results;
|
|
789 |
}
|
|
790 |
}
|
|
791 |
|
|
792 |
// Take advantage of querySelectorAll
|
|
793 |
if ( support.qsa &&
|
|
794 |
!compilerCache[ selector + " " ] &&
|
|
795 |
(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
|
|
796 |
|
|
797 |
if ( nodeType !== 1 ) {
|
|
798 |
newContext = context;
|
|
799 |
newSelector = selector;
|
|
800 |
|
|
801 |
// qSA looks outside Element context, which is not what we want
|
|
802 |
// Thanks to Andrew Dupont for this workaround technique
|
|
803 |
// Support: IE <=8
|
|
804 |
// Exclude object elements
|
|
805 |
} else if ( context.nodeName.toLowerCase() !== "object" ) {
|
|
806 |
|
|
807 |
// Capture the context ID, setting it first if necessary
|
|
808 |
if ( (nid = context.getAttribute( "id" )) ) {
|
|
809 |
nid = nid.replace( rcssescape, fcssescape );
|
|
810 |
} else {
|
|
811 |
context.setAttribute( "id", (nid = expando) );
|
|
812 |
}
|
|
813 |
|
|
814 |
// Prefix every selector in the list
|
|
815 |
groups = tokenize( selector );
|
|
816 |
i = groups.length;
|
|
817 |
while ( i-- ) {
|
|
818 |
groups[i] = "#" + nid + " " + toSelector( groups[i] );
|
|
819 |
}
|
|
820 |
newSelector = groups.join( "," );
|
|
821 |
|
|
822 |
// Expand context for sibling selectors
|
|
823 |
newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
|
|
824 |
context;
|
|
825 |
}
|
|
826 |
|
|
827 |
if ( newSelector ) {
|
|
828 |
try {
|
|
829 |
push.apply( results,
|
|
830 |
newContext.querySelectorAll( newSelector )
|
|
831 |
);
|
|
832 |
return results;
|
|
833 |
} catch ( qsaError ) {
|
|
834 |
} finally {
|
|
835 |
if ( nid === expando ) {
|
|
836 |
context.removeAttribute( "id" );
|
|
837 |
}
|
|
838 |
}
|
|
839 |
}
|
|
840 |
}
|
|
841 |
}
|
|
842 |
}
|
|
843 |
|
|
844 |
// All others
|
|
845 |
return select( selector.replace( rtrim, "$1" ), context, results, seed );
|
|
846 |
}
|
|
847 |
|
|
848 |
/**
|
|
849 |
* Create key-value caches of limited size
|
|
850 |
* @returns {function(string, object)} Returns the Object data after storing it on itself with
|
|
851 |
* property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
|
|
852 |
* deleting the oldest entry
|
|
853 |
*/
|
|
854 |
function createCache() {
|
|
855 |
var keys = [];
|
|
856 |
|
|
857 |
function cache( key, value ) {
|
|
858 |
// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
|
|
859 |
if ( keys.push( key + " " ) > Expr.cacheLength ) {
|
|
860 |
// Only keep the most recent entries
|
|
861 |
delete cache[ keys.shift() ];
|
|
862 |
}
|
|
863 |
return (cache[ key + " " ] = value);
|
|
864 |
}
|
|
865 |
return cache;
|
|
866 |
}
|
|
867 |
|
|
868 |
/**
|
|
869 |
* Mark a function for special use by Sizzle
|
|
870 |
* @param {Function} fn The function to mark
|
|
871 |
*/
|
|
872 |
function markFunction( fn ) {
|
|
873 |
fn[ expando ] = true;
|
|
874 |
return fn;
|
|
875 |
}
|
|
876 |
|
|
877 |
/**
|
|
878 |
* Support testing using an element
|
|
879 |
* @param {Function} fn Passed the created element and returns a boolean result
|
|
880 |
*/
|
|
881 |
function assert( fn ) {
|
|
882 |
var el = document.createElement("fieldset");
|
|
883 |
|
|
884 |
try {
|
|
885 |
return !!fn( el );
|
|
886 |
} catch (e) {
|
|
887 |
return false;
|
|
888 |
} finally {
|
|
889 |
// Remove from its parent by default
|
|
890 |
if ( el.parentNode ) {
|
|
891 |
el.parentNode.removeChild( el );
|
|
892 |
}
|
|
893 |
// release memory in IE
|
|
894 |
el = null;
|
|
895 |
}
|
|
896 |
}
|
|
897 |
|
|
898 |
/**
|
|
899 |
* Adds the same handler for all of the specified attrs
|
|
900 |
* @param {String} attrs Pipe-separated list of attributes
|
|
901 |
* @param {Function} handler The method that will be applied
|
|
902 |
*/
|
|
903 |
function addHandle( attrs, handler ) {
|
|
904 |
var arr = attrs.split("|"),
|
|
905 |
i = arr.length;
|
|
906 |
|
|
907 |
while ( i-- ) {
|
|
908 |
Expr.attrHandle[ arr[i] ] = handler;
|
|
909 |
}
|
|
910 |
}
|
|
911 |
|
|
912 |
/**
|
|
913 |
* Checks document order of two siblings
|
|
914 |
* @param {Element} a
|
|
915 |
* @param {Element} b
|
|
916 |
* @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
|
|
917 |
*/
|
|
918 |
function siblingCheck( a, b ) {
|
|
919 |
var cur = b && a,
|
|
920 |
diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
|
|
921 |
a.sourceIndex - b.sourceIndex;
|
|
922 |
|
|
923 |
// Use IE sourceIndex if available on both nodes
|
|
924 |
if ( diff ) {
|
|
925 |
return diff;
|
|
926 |
}
|
|
927 |
|
|
928 |
// Check if b follows a
|
|
929 |
if ( cur ) {
|
|
930 |
while ( (cur = cur.nextSibling) ) {
|
|
931 |
if ( cur === b ) {
|
|
932 |
return -1;
|
|
933 |
}
|
|
934 |
}
|
|
935 |
}
|
|
936 |
|
|
937 |
return a ? 1 : -1;
|
|
938 |
}
|
|
939 |
|
|
940 |
/**
|
|
941 |
* Returns a function to use in pseudos for input types
|
|
942 |
* @param {String} type
|
|
943 |
*/
|
|
944 |
function createInputPseudo( type ) {
|
|
945 |
return function( elem ) {
|
|
946 |
var name = elem.nodeName.toLowerCase();
|
|
947 |
return name === "input" && elem.type === type;
|
|
948 |
};
|
|
949 |
}
|
|
950 |
|
|
951 |
/**
|
|
952 |
* Returns a function to use in pseudos for buttons
|
|
953 |
* @param {String} type
|
|
954 |
*/
|
|
955 |
function createButtonPseudo( type ) {
|
|
956 |
return function( elem ) {
|
|
957 |
var name = elem.nodeName.toLowerCase();
|
|
958 |
return (name === "input" || name === "button") && elem.type === type;
|
|
959 |
};
|
|
960 |
}
|
|
961 |
|
|
962 |
/**
|
|
963 |
* Returns a function to use in pseudos for :enabled/:disabled
|
|
964 |
* @param {Boolean} disabled true for :disabled; false for :enabled
|
|
965 |
*/
|
|
966 |
function createDisabledPseudo( disabled ) {
|
|
967 |
|
|
968 |
// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
|
|
969 |
return function( elem ) {
|
|
970 |
|
|
971 |
// Only certain elements can match :enabled or :disabled
|
|
972 |
// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
|
|
973 |
// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
|
|
974 |
if ( "form" in elem ) {
|
|
975 |
|
|
976 |
// Check for inherited disabledness on relevant non-disabled elements:
|
|
977 |
// * listed form-associated elements in a disabled fieldset
|
|
978 |
// https://html.spec.whatwg.org/multipage/forms.html#category-listed
|
|
979 |
// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
|
|
980 |
// * option elements in a disabled optgroup
|
|
981 |
// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
|
|
982 |
// All such elements have a "form" property.
|
|
983 |
if ( elem.parentNode && elem.disabled === false ) {
|
|
984 |
|
|
985 |
// Option elements defer to a parent optgroup if present
|
|
986 |
if ( "label" in elem ) {
|
|
987 |
if ( "label" in elem.parentNode ) {
|
|
988 |
return elem.parentNode.disabled === disabled;
|
|
989 |
} else {
|
|
990 |
return elem.disabled === disabled;
|
|
991 |
}
|
|
992 |
}
|
|
993 |
|
|
994 |
// Support: IE 6 - 11
|
|
995 |
// Use the isDisabled shortcut property to check for disabled fieldset ancestors
|
|
996 |
return elem.isDisabled === disabled ||
|
|
997 |
|
|
998 |
// Where there is no isDisabled, check manually
|
|
999 |
/* jshint -W018 */
|
|
1000 |
elem.isDisabled !== !disabled &&
|
|
1001 |
disabledAncestor( elem ) === disabled;
|
|
1002 |
}
|
|
1003 |
|
|
1004 |
return elem.disabled === disabled;
|
|
1005 |
|
|
1006 |
// Try to winnow out elements that can't be disabled before trusting the disabled property.
|
|
1007 |
// Some victims get caught in our net (label, legend, menu, track), but it shouldn't
|
|
1008 |
// even exist on them, let alone have a boolean value.
|
|
1009 |
} else if ( "label" in elem ) {
|
|
1010 |
return elem.disabled === disabled;
|
|
1011 |
}
|
|
1012 |
|
|
1013 |
// Remaining elements are neither :enabled nor :disabled
|
|
1014 |
return false;
|
|
1015 |
};
|
|
1016 |
}
|
|
1017 |
|
|
1018 |
/**
|
|
1019 |
* Returns a function to use in pseudos for positionals
|
|
1020 |
* @param {Function} fn
|
|
1021 |
*/
|
|
1022 |
function createPositionalPseudo( fn ) {
|
|
1023 |
return markFunction(function( argument ) {
|
|
1024 |
argument = +argument;
|
|
1025 |
return markFunction(function( seed, matches ) {
|
|
1026 |
var j,
|
|
1027 |
matchIndexes = fn( [], seed.length, argument ),
|
|
1028 |
i = matchIndexes.length;
|
|
1029 |
|
|
1030 |
// Match elements found at the specified indexes
|
|
1031 |
while ( i-- ) {
|
|
1032 |
if ( seed[ (j = matchIndexes[i]) ] ) {
|
|
1033 |
seed[j] = !(matches[j] = seed[j]);
|
|
1034 |
}
|
|
1035 |
}
|
|
1036 |
});
|
|
1037 |
});
|
|
1038 |
}
|
|
1039 |
|
|
1040 |
/**
|
|
1041 |
* Checks a node for validity as a Sizzle context
|
|
1042 |
* @param {Element|Object=} context
|
|
1043 |
* @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
|
|
1044 |
*/
|
|
1045 |
function testContext( context ) {
|
|
1046 |
return context && typeof context.getElementsByTagName !== "undefined" && context;
|
|
1047 |
}
|
|
1048 |
|
|
1049 |
// Expose support vars for convenience
|
|
1050 |
support = Sizzle.support = {};
|
|
1051 |
|
|
1052 |
/**
|
|
1053 |
* Detects XML nodes
|
|
1054 |
* @param {Element|Object} elem An element or a document
|
|
1055 |
* @returns {Boolean} True iff elem is a non-HTML XML node
|
|
1056 |
*/
|
|
1057 |
isXML = Sizzle.isXML = function( elem ) {
|
|
1058 |
// documentElement is verified for cases where it doesn't yet exist
|
|
1059 |
// (such as loading iframes in IE - #4833)
|
|
1060 |
var documentElement = elem && (elem.ownerDocument || elem).documentElement;
|
|
1061 |
return documentElement ? documentElement.nodeName !== "HTML" : false;
|
|
1062 |
};
|
|
1063 |
|
|
1064 |
/**
|
|
1065 |
* Sets document-related variables once based on the current document
|
|
1066 |
* @param {Element|Object} [doc] An element or document object to use to set the document
|
|
1067 |
* @returns {Object} Returns the current document
|
|
1068 |
*/
|
|
1069 |
setDocument = Sizzle.setDocument = function( node ) {
|
|
1070 |
var hasCompare, subWindow,
|
|
1071 |
doc = node ? node.ownerDocument || node : preferredDoc;
|
|
1072 |
|
|
1073 |
// Return early if doc is invalid or already selected
|
|
1074 |
if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
|
|
1075 |
return document;
|
|
1076 |
}
|
|
1077 |
|
|
1078 |
// Update global variables
|
|
1079 |
document = doc;
|
|
1080 |
docElem = document.documentElement;
|
|
1081 |
documentIsHTML = !isXML( document );
|
|
1082 |
|
|
1083 |
// Support: IE 9-11, Edge
|
|
1084 |
// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
|
|
1085 |
if ( preferredDoc !== document &&
|
|
1086 |
(subWindow = document.defaultView) && subWindow.top !== subWindow ) {
|
|
1087 |
|
|
1088 |
// Support: IE 11, Edge
|
|
1089 |
if ( subWindow.addEventListener ) {
|
|
1090 |
subWindow.addEventListener( "unload", unloadHandler, false );
|
|
1091 |
|
|
1092 |
// Support: IE 9 - 10 only
|
|
1093 |
} else if ( subWindow.attachEvent ) {
|
|
1094 |
subWindow.attachEvent( "onunload", unloadHandler );
|
|
1095 |
}
|
|
1096 |
}
|
|
1097 |
|
|
1098 |
/* Attributes
|
|
1099 |
---------------------------------------------------------------------- */
|
|
1100 |
|
|
1101 |
// Support: IE<8
|
|
1102 |
// Verify that getAttribute really returns attributes and not properties
|
|
1103 |
// (excepting IE8 booleans)
|
|
1104 |
support.attributes = assert(function( el ) {
|
|
1105 |
el.className = "i";
|
|
1106 |
return !el.getAttribute("className");
|
|
1107 |
});
|
|
1108 |
|
|
1109 |
/* getElement(s)By*
|
|
1110 |
---------------------------------------------------------------------- */
|
|
1111 |
|
|
1112 |
// Check if getElementsByTagName("*") returns only elements
|
|
1113 |
support.getElementsByTagName = assert(function( el ) {
|
|
1114 |
el.appendChild( document.createComment("") );
|
|
1115 |
return !el.getElementsByTagName("*").length;
|
|
1116 |
});
|
|
1117 |
|
|
1118 |
// Support: IE<9
|