Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

6734 lignes
203 KiB

  1. /*
  2. * This file has been generated to support Visual Studio IntelliSense.
  3. * You should not use this file at runtime inside the browser--it is only
  4. * intended to be used only for design-time IntelliSense. Please use the
  5. * standard jQuery library for all runtime use.
  6. *
  7. * Comment version: 1.10.2
  8. */
  9. /*!
  10. * jQuery JavaScript Library v1.10.2
  11. * http://jquery.com/
  12. *
  13. * Includes Sizzle.js
  14. * http://sizzlejs.com/
  15. *
  16. * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
  17. * Released under the MIT license
  18. * http://jquery.org/license
  19. *
  20. */
  21. (function ( window, undefined ) {
  22. var jQuery = function( selector, context ) {
  23. /// <summary>
  24. /// 1: Accepts a string containing a CSS selector which is then used to match a set of elements.
  25. /// &#10; 1.1 - $(selector, context)
  26. /// &#10; 1.2 - $(element)
  27. /// &#10; 1.3 - $(object)
  28. /// &#10; 1.4 - $(elementArray)
  29. /// &#10; 1.5 - $(jQuery object)
  30. /// &#10; 1.6 - $()
  31. /// &#10;2: Creates DOM elements on the fly from the provided string of raw HTML.
  32. /// &#10; 2.1 - $(html, ownerDocument)
  33. /// &#10; 2.2 - $(html, props)
  34. /// &#10;3: Binds a function to be executed when the DOM has finished loading.
  35. /// &#10; 3.1 - $(callback)
  36. /// </summary>
  37. /// <param name="selector" type="String">
  38. /// A string containing a selector expression
  39. /// </param>
  40. /// <param name="context" type="jQuery">
  41. /// A DOM Element, Document, or jQuery to use as context
  42. /// </param>
  43. /// <returns type="jQuery" />
  44. // The jQuery object is actually just the init constructor 'enhanced'
  45. return new jQuery.fn.init( selector, context, rootjQuery );
  46. };
  47. jQuery.Animation = function Animation( elem, properties, options ) {
  48. var result,
  49. stopped,
  50. index = 0,
  51. length = animationPrefilters.length,
  52. deferred = jQuery.Deferred().always( function() {
  53. // don't match elem in the :animated selector
  54. delete tick.elem;
  55. }),
  56. tick = function() {
  57. if ( stopped ) {
  58. return false;
  59. }
  60. var currentTime = fxNow || createFxNow(),
  61. remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
  62. // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
  63. temp = remaining / animation.duration || 0,
  64. percent = 1 - temp,
  65. index = 0,
  66. length = animation.tweens.length;
  67. for ( ; index < length ; index++ ) {
  68. animation.tweens[ index ].run( percent );
  69. }
  70. deferred.notifyWith( elem, [ animation, percent, remaining ]);
  71. if ( percent < 1 && length ) {
  72. return remaining;
  73. } else {
  74. deferred.resolveWith( elem, [ animation ] );
  75. return false;
  76. }
  77. },
  78. animation = deferred.promise({
  79. elem: elem,
  80. props: jQuery.extend( {}, properties ),
  81. opts: jQuery.extend( true, { specialEasing: {} }, options ),
  82. originalProperties: properties,
  83. originalOptions: options,
  84. startTime: fxNow || createFxNow(),
  85. duration: options.duration,
  86. tweens: [],
  87. createTween: function( prop, end ) {
  88. var tween = jQuery.Tween( elem, animation.opts, prop, end,
  89. animation.opts.specialEasing[ prop ] || animation.opts.easing );
  90. animation.tweens.push( tween );
  91. return tween;
  92. },
  93. stop: function( gotoEnd ) {
  94. var index = 0,
  95. // if we are going to the end, we want to run all the tweens
  96. // otherwise we skip this part
  97. length = gotoEnd ? animation.tweens.length : 0;
  98. if ( stopped ) {
  99. return this;
  100. }
  101. stopped = true;
  102. for ( ; index < length ; index++ ) {
  103. animation.tweens[ index ].run( 1 );
  104. }
  105. // resolve when we played the last frame
  106. // otherwise, reject
  107. if ( gotoEnd ) {
  108. deferred.resolveWith( elem, [ animation, gotoEnd ] );
  109. } else {
  110. deferred.rejectWith( elem, [ animation, gotoEnd ] );
  111. }
  112. return this;
  113. }
  114. }),
  115. props = animation.props;
  116. propFilter( props, animation.opts.specialEasing );
  117. for ( ; index < length ; index++ ) {
  118. result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
  119. if ( result ) {
  120. return result;
  121. }
  122. }
  123. jQuery.map( props, createTween, animation );
  124. if ( jQuery.isFunction( animation.opts.start ) ) {
  125. animation.opts.start.call( elem, animation );
  126. }
  127. jQuery.fx.timer(
  128. jQuery.extend( tick, {
  129. elem: elem,
  130. anim: animation,
  131. queue: animation.opts.queue
  132. })
  133. );
  134. // attach callbacks from options
  135. return animation.progress( animation.opts.progress )
  136. .done( animation.opts.done, animation.opts.complete )
  137. .fail( animation.opts.fail )
  138. .always( animation.opts.always );
  139. };
  140. jQuery.Callbacks = function( options ) {
  141. /// <summary>
  142. /// A multi-purpose callbacks list object that provides a powerful way to manage callback lists.
  143. /// </summary>
  144. /// <param name="options" type="String">
  145. /// An optional list of space-separated flags that change how the callback list behaves.
  146. /// </param>
  147. // Convert options from String-formatted to Object-formatted if needed
  148. // (we check in cache first)
  149. options = typeof options === "string" ?
  150. ( optionsCache[ options ] || createOptions( options ) ) :
  151. jQuery.extend( {}, options );
  152. var // Flag to know if list is currently firing
  153. firing,
  154. // Last fire value (for non-forgettable lists)
  155. memory,
  156. // Flag to know if list was already fired
  157. fired,
  158. // End of the loop when firing
  159. firingLength,
  160. // Index of currently firing callback (modified by remove if needed)
  161. firingIndex,
  162. // First callback to fire (used internally by add and fireWith)
  163. firingStart,
  164. // Actual callback list
  165. list = [],
  166. // Stack of fire calls for repeatable lists
  167. stack = !options.once && [],
  168. // Fire callbacks
  169. fire = function( data ) {
  170. memory = options.memory && data;
  171. fired = true;
  172. firingIndex = firingStart || 0;
  173. firingStart = 0;
  174. firingLength = list.length;
  175. firing = true;
  176. for ( ; list && firingIndex < firingLength; firingIndex++ ) {
  177. if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
  178. memory = false; // To prevent further calls using add
  179. break;
  180. }
  181. }
  182. firing = false;
  183. if ( list ) {
  184. if ( stack ) {
  185. if ( stack.length ) {
  186. fire( stack.shift() );
  187. }
  188. } else if ( memory ) {
  189. list = [];
  190. } else {
  191. self.disable();
  192. }
  193. }
  194. },
  195. // Actual Callbacks object
  196. self = {
  197. // Add a callback or a collection of callbacks to the list
  198. add: function() {
  199. if ( list ) {
  200. // First, we save the current length
  201. var start = list.length;
  202. (function add( args ) {
  203. jQuery.each( args, function( _, arg ) {
  204. var type = jQuery.type( arg );
  205. if ( type === "function" ) {
  206. if ( !options.unique || !self.has( arg ) ) {
  207. list.push( arg );
  208. }
  209. } else if ( arg && arg.length && type !== "string" ) {
  210. // Inspect recursively
  211. add( arg );
  212. }
  213. });
  214. })( arguments );
  215. // Do we need to add the callbacks to the
  216. // current firing batch?
  217. if ( firing ) {
  218. firingLength = list.length;
  219. // With memory, if we're not firing then
  220. // we should call right away
  221. } else if ( memory ) {
  222. firingStart = start;
  223. fire( memory );
  224. }
  225. }
  226. return this;
  227. },
  228. // Remove a callback from the list
  229. remove: function() {
  230. if ( list ) {
  231. jQuery.each( arguments, function( _, arg ) {
  232. var index;
  233. while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
  234. list.splice( index, 1 );
  235. // Handle firing indexes
  236. if ( firing ) {
  237. if ( index <= firingLength ) {
  238. firingLength--;
  239. }
  240. if ( index <= firingIndex ) {
  241. firingIndex--;
  242. }
  243. }
  244. }
  245. });
  246. }
  247. return this;
  248. },
  249. // Check if a given callback is in the list.
  250. // If no argument is given, return whether or not list has callbacks attached.
  251. has: function( fn ) {
  252. return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
  253. },
  254. // Remove all callbacks from the list
  255. empty: function() {
  256. list = [];
  257. firingLength = 0;
  258. return this;
  259. },
  260. // Have the list do nothing anymore
  261. disable: function() {
  262. list = stack = memory = undefined;
  263. return this;
  264. },
  265. // Is it disabled?
  266. disabled: function() {
  267. return !list;
  268. },
  269. // Lock the list in its current state
  270. lock: function() {
  271. stack = undefined;
  272. if ( !memory ) {
  273. self.disable();
  274. }
  275. return this;
  276. },
  277. // Is it locked?
  278. locked: function() {
  279. return !stack;
  280. },
  281. // Call all callbacks with the given context and arguments
  282. fireWith: function( context, args ) {
  283. args = args || [];
  284. args = [ context, args.slice ? args.slice() : args ];
  285. if ( list && ( !fired || stack ) ) {
  286. if ( firing ) {
  287. stack.push( args );
  288. } else {
  289. fire( args );
  290. }
  291. }
  292. return this;
  293. },
  294. // Call all the callbacks with the given arguments
  295. fire: function() {
  296. self.fireWith( this, arguments );
  297. return this;
  298. },
  299. // To know if the callbacks have already been called at least once
  300. fired: function() {
  301. return !!fired;
  302. }
  303. };
  304. return self;
  305. };
  306. jQuery.Deferred = function( func ) {
  307. var tuples = [
  308. // action, add listener, listener list, final state
  309. [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
  310. [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
  311. [ "notify", "progress", jQuery.Callbacks("memory") ]
  312. ],
  313. state = "pending",
  314. promise = {
  315. state: function() {
  316. return state;
  317. },
  318. always: function() {
  319. deferred.done( arguments ).fail( arguments );
  320. return this;
  321. },
  322. then: function( /* fnDone, fnFail, fnProgress */ ) {
  323. var fns = arguments;
  324. return jQuery.Deferred(function( newDefer ) {
  325. jQuery.each( tuples, function( i, tuple ) {
  326. var action = tuple[ 0 ],
  327. fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
  328. // deferred[ done | fail | progress ] for forwarding actions to newDefer
  329. deferred[ tuple[1] ](function() {
  330. var returned = fn && fn.apply( this, arguments );
  331. if ( returned && jQuery.isFunction( returned.promise ) ) {
  332. returned.promise()
  333. .done( newDefer.resolve )
  334. .fail( newDefer.reject )
  335. .progress( newDefer.notify );
  336. } else {
  337. newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
  338. }
  339. });
  340. });
  341. fns = null;
  342. }).promise();
  343. },
  344. // Get a promise for this deferred
  345. // If obj is provided, the promise aspect is added to the object
  346. promise: function( obj ) {
  347. return obj != null ? jQuery.extend( obj, promise ) : promise;
  348. }
  349. },
  350. deferred = {};
  351. // Keep pipe for back-compat
  352. promise.pipe = promise.then;
  353. // Add list-specific methods
  354. jQuery.each( tuples, function( i, tuple ) {
  355. var list = tuple[ 2 ],
  356. stateString = tuple[ 3 ];
  357. // promise[ done | fail | progress ] = list.add
  358. promise[ tuple[1] ] = list.add;
  359. // Handle state
  360. if ( stateString ) {
  361. list.add(function() {
  362. // state = [ resolved | rejected ]
  363. state = stateString;
  364. // [ reject_list | resolve_list ].disable; progress_list.lock
  365. }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
  366. }
  367. // deferred[ resolve | reject | notify ]
  368. deferred[ tuple[0] ] = function() {
  369. deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
  370. return this;
  371. };
  372. deferred[ tuple[0] + "With" ] = list.fireWith;
  373. });
  374. // Make the deferred a promise
  375. promise.promise( deferred );
  376. // Call given func if any
  377. if ( func ) {
  378. func.call( deferred, deferred );
  379. }
  380. // All done!
  381. return deferred;
  382. };
  383. jQuery.Event = function( src, props ) {
  384. // Allow instantiation without the 'new' keyword
  385. if ( !(this instanceof jQuery.Event) ) {
  386. return new jQuery.Event( src, props );
  387. }
  388. // Event object
  389. if ( src && src.type ) {
  390. this.originalEvent = src;
  391. this.type = src.type;
  392. // Events bubbling up the document may have been marked as prevented
  393. // by a handler lower down the tree; reflect the correct value.
  394. this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
  395. src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
  396. // Event type
  397. } else {
  398. this.type = src;
  399. }
  400. // Put explicitly provided properties onto the event object
  401. if ( props ) {
  402. jQuery.extend( this, props );
  403. }
  404. // Create a timestamp if incoming event doesn't have one
  405. this.timeStamp = src && src.timeStamp || jQuery.now();
  406. // Mark it as fixed
  407. this[ jQuery.expando ] = true;
  408. };
  409. jQuery.Tween = function Tween( elem, options, prop, end, easing ) {
  410. return new Tween.prototype.init( elem, options, prop, end, easing );
  411. };
  412. jQuery._data = function( elem, name, data ) {
  413. return internalData( elem, name, data, true );
  414. };
  415. jQuery._evalUrl = function( url ) {
  416. return jQuery.ajax({
  417. url: url,
  418. type: "GET",
  419. dataType: "script",
  420. async: false,
  421. global: false,
  422. "throws": true
  423. });
  424. };
  425. jQuery._queueHooks = function( elem, type ) {
  426. var key = type + "queueHooks";
  427. return jQuery._data( elem, key ) || jQuery._data( elem, key, {
  428. empty: jQuery.Callbacks("once memory").add(function() {
  429. jQuery._removeData( elem, type + "queue" );
  430. jQuery._removeData( elem, key );
  431. })
  432. });
  433. };
  434. jQuery._removeData = function( elem, name ) {
  435. return internalRemoveData( elem, name, true );
  436. };
  437. jQuery.acceptData = function( elem ) {
  438. // Do not set data on non-element because it will not be cleared (#8335).
  439. if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {
  440. return false;
  441. }
  442. var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
  443. // nodes accept data unless otherwise specified; rejection can be conditional
  444. return !noData || noData !== true && elem.getAttribute("classid") === noData;
  445. };
  446. jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
  447. var i = 0,
  448. length = elems.length,
  449. bulk = key == null;
  450. // Sets many values
  451. if ( jQuery.type( key ) === "object" ) {
  452. chainable = true;
  453. for ( i in key ) {
  454. jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
  455. }
  456. // Sets one value
  457. } else if ( value !== undefined ) {
  458. chainable = true;
  459. if ( !jQuery.isFunction( value ) ) {
  460. raw = true;
  461. }
  462. if ( bulk ) {
  463. // Bulk operations run against the entire set
  464. if ( raw ) {
  465. fn.call( elems, value );
  466. fn = null;
  467. // ...except when executing function values
  468. } else {
  469. bulk = fn;
  470. fn = function( elem, key, value ) {
  471. return bulk.call( jQuery( elem ), value );
  472. };
  473. }
  474. }
  475. if ( fn ) {
  476. for ( ; i < length; i++ ) {
  477. fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
  478. }
  479. }
  480. }
  481. return chainable ?
  482. elems :
  483. // Gets
  484. bulk ?
  485. fn.call( elems ) :
  486. length ? fn( elems[0], key ) : emptyGet;
  487. };
  488. jQuery.active = 0;
  489. jQuery.ajax = function( url, options ) {
  490. /// <summary>
  491. /// Perform an asynchronous HTTP (Ajax) request.
  492. /// &#10;1 - jQuery.ajax(url, settings)
  493. /// &#10;2 - jQuery.ajax(settings)
  494. /// </summary>
  495. /// <param name="url" type="String">
  496. /// A string containing the URL to which the request is sent.
  497. /// </param>
  498. /// <param name="options" type="Object">
  499. /// A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) below for a complete list of all settings.
  500. /// </param>
  501. // If url is an object, simulate pre-1.5 signature
  502. if ( typeof url === "object" ) {
  503. options = url;
  504. url = undefined;
  505. }
  506. // Force options to be an object
  507. options = options || {};
  508. var // Cross-domain detection vars
  509. parts,
  510. // Loop variable
  511. i,
  512. // URL without anti-cache param
  513. cacheURL,
  514. // Response headers as string
  515. responseHeadersString,
  516. // timeout handle
  517. timeoutTimer,
  518. // To know if global events are to be dispatched
  519. fireGlobals,
  520. transport,
  521. // Response headers
  522. responseHeaders,
  523. // Create the final options object
  524. s = jQuery.ajaxSetup( {}, options ),
  525. // Callbacks context
  526. callbackContext = s.context || s,
  527. // Context for global events is callbackContext if it is a DOM node or jQuery collection
  528. globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
  529. jQuery( callbackContext ) :
  530. jQuery.event,
  531. // Deferreds
  532. deferred = jQuery.Deferred(),
  533. completeDeferred = jQuery.Callbacks("once memory"),
  534. // Status-dependent callbacks
  535. statusCode = s.statusCode || {},
  536. // Headers (they are sent all at once)
  537. requestHeaders = {},
  538. requestHeadersNames = {},
  539. // The jqXHR state
  540. state = 0,
  541. // Default abort message
  542. strAbort = "canceled",
  543. // Fake xhr
  544. jqXHR = {
  545. readyState: 0,
  546. // Builds headers hashtable if needed
  547. getResponseHeader: function( key ) {
  548. var match;
  549. if ( state === 2 ) {
  550. if ( !responseHeaders ) {
  551. responseHeaders = {};
  552. while ( (match = rheaders.exec( responseHeadersString )) ) {
  553. responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
  554. }
  555. }
  556. match = responseHeaders[ key.toLowerCase() ];
  557. }
  558. return match == null ? null : match;
  559. },
  560. // Raw string
  561. getAllResponseHeaders: function() {
  562. return state === 2 ? responseHeadersString : null;
  563. },
  564. // Caches the header
  565. setRequestHeader: function( name, value ) {
  566. var lname = name.toLowerCase();
  567. if ( !state ) {
  568. name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
  569. requestHeaders[ name ] = value;
  570. }
  571. return this;
  572. },
  573. // Overrides response content-type header
  574. overrideMimeType: function( type ) {
  575. if ( !state ) {
  576. s.mimeType = type;
  577. }
  578. return this;
  579. },
  580. // Status-dependent callbacks
  581. statusCode: function( map ) {
  582. var code;
  583. if ( map ) {
  584. if ( state < 2 ) {
  585. for ( code in map ) {
  586. // Lazy-add the new callback in a way that preserves old ones
  587. statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
  588. }
  589. } else {
  590. // Execute the appropriate callbacks
  591. jqXHR.always( map[ jqXHR.status ] );
  592. }
  593. }
  594. return this;
  595. },
  596. // Cancel the request
  597. abort: function( statusText ) {
  598. var finalText = statusText || strAbort;
  599. if ( transport ) {
  600. transport.abort( finalText );
  601. }
  602. done( 0, finalText );
  603. return this;
  604. }
  605. };
  606. // Attach deferreds
  607. deferred.promise( jqXHR ).complete = completeDeferred.add;
  608. jqXHR.success = jqXHR.done;
  609. jqXHR.error = jqXHR.fail;
  610. // Remove hash character (#7531: and string promotion)
  611. // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
  612. // Handle falsy url in the settings object (#10093: consistency with old signature)
  613. // We also use the url parameter if available
  614. s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
  615. // Alias method option to type as per ticket #12004
  616. s.type = options.method || options.type || s.method || s.type;
  617. // Extract dataTypes list
  618. s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];
  619. // A cross-domain request is in order when we have a protocol:host:port mismatch
  620. if ( s.crossDomain == null ) {
  621. parts = rurl.exec( s.url.toLowerCase() );
  622. s.crossDomain = !!( parts &&
  623. ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
  624. ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
  625. ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
  626. );
  627. }
  628. // Convert data if not already a string
  629. if ( s.data && s.processData && typeof s.data !== "string" ) {
  630. s.data = jQuery.param( s.data, s.traditional );
  631. }
  632. // Apply prefilters
  633. inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
  634. // If request was aborted inside a prefilter, stop there
  635. if ( state === 2 ) {
  636. return jqXHR;
  637. }
  638. // We can fire global events as of now if asked to
  639. fireGlobals = s.global;
  640. // Watch for a new set of requests
  641. if ( fireGlobals && jQuery.active++ === 0 ) {
  642. jQuery.event.trigger("ajaxStart");
  643. }
  644. // Uppercase the type
  645. s.type = s.type.toUpperCase();
  646. // Determine if request has content
  647. s.hasContent = !rnoContent.test( s.type );
  648. // Save the URL in case we're toying with the If-Modified-Since
  649. // and/or If-None-Match header later on
  650. cacheURL = s.url;
  651. // More options handling for requests with no content
  652. if ( !s.hasContent ) {
  653. // If data is available, append data to url
  654. if ( s.data ) {
  655. cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
  656. // #9682: remove data so that it's not used in an eventual retry
  657. delete s.data;
  658. }
  659. // Add anti-cache in url if needed
  660. if ( s.cache === false ) {
  661. s.url = rts.test( cacheURL ) ?
  662. // If there is already a '_' parameter, set its value
  663. cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) :
  664. // Otherwise add one to the end
  665. cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++;
  666. }
  667. }
  668. // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
  669. if ( s.ifModified ) {
  670. if ( jQuery.lastModified[ cacheURL ] ) {
  671. jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
  672. }
  673. if ( jQuery.etag[ cacheURL ] ) {
  674. jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
  675. }
  676. }
  677. // Set the correct header, if data is being sent
  678. if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
  679. jqXHR.setRequestHeader( "Content-Type", s.contentType );
  680. }
  681. // Set the Accepts header for the server, depending on the dataType
  682. jqXHR.setRequestHeader(
  683. "Accept",
  684. s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
  685. s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
  686. s.accepts[ "*" ]
  687. );
  688. // Check for headers option
  689. for ( i in s.headers ) {
  690. jqXHR.setRequestHeader( i, s.headers[ i ] );
  691. }
  692. // Allow custom headers/mimetypes and early abort
  693. if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
  694. // Abort if not done already and return
  695. return jqXHR.abort();
  696. }
  697. // aborting is no longer a cancellation
  698. strAbort = "abort";
  699. // Install callbacks on deferreds
  700. for ( i in { success: 1, error: 1, complete: 1 } ) {
  701. jqXHR[ i ]( s[ i ] );
  702. }
  703. // Get transport
  704. transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
  705. // If no transport, we auto-abort
  706. if ( !transport ) {
  707. done( -1, "No Transport" );
  708. } else {
  709. jqXHR.readyState = 1;
  710. // Send global event
  711. if ( fireGlobals ) {
  712. globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
  713. }
  714. // Timeout
  715. if ( s.async && s.timeout > 0 ) {
  716. timeoutTimer = setTimeout(function() {
  717. jqXHR.abort("timeout");
  718. }, s.timeout );
  719. }
  720. try {
  721. state = 1;
  722. transport.send( requestHeaders, done );
  723. } catch ( e ) {
  724. // Propagate exception as error if not done
  725. if ( state < 2 ) {
  726. done( -1, e );
  727. // Simply rethrow otherwise
  728. } else {
  729. throw e;
  730. }
  731. }
  732. }
  733. // Callback for when everything is done
  734. function done( status, nativeStatusText, responses, headers ) {
  735. var isSuccess, success, error, response, modified,
  736. statusText = nativeStatusText;
  737. // Called once
  738. if ( state === 2 ) {
  739. return;
  740. }
  741. // State is "done" now
  742. state = 2;
  743. // Clear timeout if it exists
  744. if ( timeoutTimer ) {
  745. clearTimeout( timeoutTimer );
  746. }
  747. // Dereference transport for early garbage collection
  748. // (no matter how long the jqXHR object will be used)
  749. transport = undefined;
  750. // Cache response headers
  751. responseHeadersString = headers || "";
  752. // Set readyState
  753. jqXHR.readyState = status > 0 ? 4 : 0;
  754. // Determine if successful
  755. isSuccess = status >= 200 && status < 300 || status === 304;
  756. // Get response data
  757. if ( responses ) {
  758. response = ajaxHandleResponses( s, jqXHR, responses );
  759. }
  760. // Convert no matter what (that way responseXXX fields are always set)
  761. response = ajaxConvert( s, response, jqXHR, isSuccess );
  762. // If successful, handle type chaining
  763. if ( isSuccess ) {
  764. // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
  765. if ( s.ifModified ) {
  766. modified = jqXHR.getResponseHeader("Last-Modified");
  767. if ( modified ) {
  768. jQuery.lastModified[ cacheURL ] = modified;
  769. }
  770. modified = jqXHR.getResponseHeader("etag");
  771. if ( modified ) {
  772. jQuery.etag[ cacheURL ] = modified;
  773. }
  774. }
  775. // if no content
  776. if ( status === 204 || s.type === "HEAD" ) {
  777. statusText = "nocontent";
  778. // if not modified
  779. } else if ( status === 304 ) {
  780. statusText = "notmodified";
  781. // If we have data, let's convert it
  782. } else {
  783. statusText = response.state;
  784. success = response.data;
  785. error = response.error;
  786. isSuccess = !error;
  787. }
  788. } else {
  789. // We extract error from statusText
  790. // then normalize statusText and status for non-aborts
  791. error = statusText;
  792. if ( status || !statusText ) {
  793. statusText = "error";
  794. if ( status < 0 ) {
  795. status = 0;
  796. }
  797. }
  798. }
  799. // Set data for the fake xhr object
  800. jqXHR.status = status;
  801. jqXHR.statusText = ( nativeStatusText || statusText ) + "";
  802. // Success/Error
  803. if ( isSuccess ) {
  804. deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
  805. } else {
  806. deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
  807. }
  808. // Status-dependent callbacks
  809. jqXHR.statusCode( statusCode );
  810. statusCode = undefined;
  811. if ( fireGlobals ) {
  812. globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
  813. [ jqXHR, s, isSuccess ? success : error ] );
  814. }
  815. // Complete
  816. completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
  817. if ( fireGlobals ) {
  818. globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
  819. // Handle the global AJAX counter
  820. if ( !( --jQuery.active ) ) {
  821. jQuery.event.trigger("ajaxStop");
  822. }
  823. }
  824. }
  825. return jqXHR;
  826. };
  827. jQuery.ajaxPrefilter = function( dataTypeExpression, func ) {
  828. /// <summary>
  829. /// Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().
  830. /// </summary>
  831. /// <param name="dataTypeExpression" type="String">
  832. /// An optional string containing one or more space-separated dataTypes
  833. /// </param>
  834. /// <param name="func" type="Function">
  835. /// A handler to set default values for future Ajax requests.
  836. /// </param>
  837. /// <returns type="undefined" />
  838. if ( typeof dataTypeExpression !== "string" ) {
  839. func = dataTypeExpression;
  840. dataTypeExpression = "*";
  841. }
  842. var dataType,
  843. i = 0,
  844. dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
  845. if ( jQuery.isFunction( func ) ) {
  846. // For each dataType in the dataTypeExpression
  847. while ( (dataType = dataTypes[i++]) ) {
  848. // Prepend if requested
  849. if ( dataType[0] === "+" ) {
  850. dataType = dataType.slice( 1 ) || "*";
  851. (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
  852. // Otherwise append
  853. } else {
  854. (structure[ dataType ] = structure[ dataType ] || []).push( func );
  855. }
  856. }
  857. }
  858. };
  859. jQuery.ajaxSettings = { "url": 'http://jqueryvsdocgen.azurewebsites.net/?ver=1.10.2&newLineMethod=xml',
  860. "type": 'GET',
  861. "isLocal": false,
  862. "global": true,
  863. "processData": true,
  864. "async": true,
  865. "contentType": 'application/x-www-form-urlencoded; charset=UTF-8',
  866. "accepts": {},
  867. "contents": {},
  868. "responseFields": {},
  869. "converters": {},
  870. "flatOptions": {},
  871. "jsonp": 'callback' };
  872. jQuery.ajaxSetup = function( target, settings ) {
  873. /// <summary>
  874. /// Set default values for future Ajax requests.
  875. /// </summary>
  876. /// <param name="target" type="Object">
  877. /// A set of key/value pairs that configure the default Ajax request. All options are optional.
  878. /// </param>
  879. return settings ?
  880. // Building a settings object
  881. ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
  882. // Extending ajaxSettings
  883. ajaxExtend( jQuery.ajaxSettings, target );
  884. };
  885. jQuery.ajaxTransport = function( dataTypeExpression, func ) {
  886. if ( typeof dataTypeExpression !== "string" ) {
  887. func = dataTypeExpression;
  888. dataTypeExpression = "*";
  889. }
  890. var dataType,
  891. i = 0,
  892. dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
  893. if ( jQuery.isFunction( func ) ) {
  894. // For each dataType in the dataTypeExpression
  895. while ( (dataType = dataTypes[i++]) ) {
  896. // Prepend if requested
  897. if ( dataType[0] === "+" ) {
  898. dataType = dataType.slice( 1 ) || "*";
  899. (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
  900. // Otherwise append
  901. } else {
  902. (structure[ dataType ] = structure[ dataType ] || []).push( func );
  903. }
  904. }
  905. }
  906. };
  907. jQuery.attr = function( elem, name, value ) {
  908. var hooks, ret,
  909. nType = elem.nodeType;
  910. // don't get/set attributes on text, comment and attribute nodes
  911. if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
  912. return;
  913. }
  914. // Fallback to prop when attributes are not supported
  915. if ( typeof elem.getAttribute === core_strundefined ) {
  916. return jQuery.prop( elem, name, value );
  917. }
  918. // All attributes are lowercase
  919. // Grab necessary hook if one is defined
  920. if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
  921. name = name.toLowerCase();
  922. hooks = jQuery.attrHooks[ name ] ||
  923. ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
  924. }
  925. if ( value !== undefined ) {
  926. if ( value === null ) {
  927. jQuery.removeAttr( elem, name );
  928. } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
  929. return ret;
  930. } else {
  931. elem.setAttribute( name, value + "" );
  932. return value;
  933. }
  934. } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
  935. return ret;
  936. } else {
  937. ret = jQuery.find.attr( elem, name );
  938. // Non-existent attributes return null, we normalize to undefined
  939. return ret == null ?
  940. undefined :
  941. ret;
  942. }
  943. };
  944. jQuery.attrHooks = { "type": {} };
  945. jQuery.buildFragment = function( elems, context, scripts, selection ) {
  946. var j, elem, contains,
  947. tmp, tag, tbody, wrap,
  948. l = elems.length,
  949. // Ensure a safe fragment
  950. safe = createSafeFragment( context ),
  951. nodes = [],
  952. i = 0;
  953. for ( ; i < l; i++ ) {
  954. elem = elems[ i ];
  955. if ( elem || elem === 0 ) {
  956. // Add nodes directly
  957. if ( jQuery.type( elem ) === "object" ) {
  958. jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
  959. // Convert non-html into a text node
  960. } else if ( !rhtml.test( elem ) ) {
  961. nodes.push( context.createTextNode( elem ) );
  962. // Convert html into DOM nodes
  963. } else {
  964. tmp = tmp || safe.appendChild( context.createElement("div") );
  965. // Deserialize a standard representation
  966. tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
  967. wrap = wrapMap[ tag ] || wrapMap._default;
  968. tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
  969. // Descend through wrappers to the right content
  970. j = wrap[0];
  971. while ( j-- ) {
  972. tmp = tmp.lastChild;
  973. }
  974. // Manually add leading whitespace removed by IE
  975. if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
  976. nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
  977. }
  978. // Remove IE's autoinserted <tbody> from table fragments
  979. if ( !jQuery.support.tbody ) {
  980. // String was a <table>, *may* have spurious <tbody>
  981. elem = tag === "table" && !rtbody.test( elem ) ?
  982. tmp.firstChild :
  983. // String was a bare <thead> or <tfoot>
  984. wrap[1] === "<table>" && !rtbody.test( elem ) ?
  985. tmp :
  986. 0;
  987. j = elem && elem.childNodes.length;
  988. while ( j-- ) {
  989. if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
  990. elem.removeChild( tbody );
  991. }
  992. }
  993. }
  994. jQuery.merge( nodes, tmp.childNodes );
  995. // Fix #12392 for WebKit and IE > 9
  996. tmp.textContent = "";
  997. // Fix #12392 for oldIE
  998. while ( tmp.firstChild ) {
  999. tmp.removeChild( tmp.firstChild );
  1000. }
  1001. // Remember the top-level container for proper cleanup
  1002. tmp = safe.lastChild;
  1003. }
  1004. }
  1005. }
  1006. // Fix #11356: Clear elements from fragment
  1007. if ( tmp ) {
  1008. safe.removeChild( tmp );
  1009. }
  1010. // Reset defaultChecked for any radios and checkboxes
  1011. // about to be appended to the DOM in IE 6/7 (#8060)
  1012. if ( !jQuery.support.appendChecked ) {
  1013. jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
  1014. }
  1015. i = 0;
  1016. while ( (elem = nodes[ i++ ]) ) {
  1017. // #4087 - If origin and destination elements are the same, and this is
  1018. // that element, do not do anything
  1019. if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
  1020. continue;
  1021. }
  1022. contains = jQuery.contains( elem.ownerDocument, elem );
  1023. // Append to fragment
  1024. tmp = getAll( safe.appendChild( elem ), "script" );
  1025. // Preserve script evaluation history
  1026. if ( contains ) {
  1027. setGlobalEval( tmp );
  1028. }
  1029. // Capture executables
  1030. if ( scripts ) {
  1031. j = 0;
  1032. while ( (elem = tmp[ j++ ]) ) {
  1033. if ( rscriptType.test( elem.type || "" ) ) {
  1034. scripts.push( elem );
  1035. }
  1036. }
  1037. }
  1038. }
  1039. tmp = null;
  1040. return safe;
  1041. };
  1042. jQuery.cache = {};
  1043. jQuery.camelCase = function( string ) {
  1044. return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
  1045. };
  1046. jQuery.cleanData = function( elems, /* internal */ acceptData ) {
  1047. var elem, type, id, data,
  1048. i = 0,
  1049. internalKey = jQuery.expando,
  1050. cache = jQuery.cache,
  1051. deleteExpando = jQuery.support.deleteExpando,
  1052. special = jQuery.event.special;
  1053. for ( ; (elem = elems[i]) != null; i++ ) {
  1054. if ( acceptData || jQuery.acceptData( elem ) ) {
  1055. id = elem[ internalKey ];
  1056. data = id && cache[ id ];
  1057. if ( data ) {
  1058. if ( data.events ) {
  1059. for ( type in data.events ) {
  1060. if ( special[ type ] ) {
  1061. jQuery.event.remove( elem, type );
  1062. // This is a shortcut to avoid jQuery.event.remove's overhead
  1063. } else {
  1064. jQuery.removeEvent( elem, type, data.handle );
  1065. }
  1066. }
  1067. }
  1068. // Remove cache only if it was not already removed by jQuery.event.remove
  1069. if ( cache[ id ] ) {
  1070. delete cache[ id ];
  1071. // IE does not allow us to delete expando properties from nodes,
  1072. // nor does it have a removeAttribute function on Document nodes;
  1073. // we must handle all of these cases
  1074. if ( deleteExpando ) {
  1075. delete elem[ internalKey ];
  1076. } else if ( typeof elem.removeAttribute !== core_strundefined ) {
  1077. elem.removeAttribute( internalKey );
  1078. } else {
  1079. elem[ internalKey ] = null;
  1080. }
  1081. core_deletedIds.push( id );
  1082. }
  1083. }
  1084. }
  1085. }
  1086. };
  1087. jQuery.clone = function( elem, dataAndEvents, deepDataAndEvents ) {
  1088. var destElements, node, clone, i, srcElements,
  1089. inPage = jQuery.contains( elem.ownerDocument, elem );
  1090. if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
  1091. clone = elem.cloneNode( true );
  1092. // IE<=8 does not properly clone detached, unknown element nodes
  1093. } else {
  1094. fragmentDiv.innerHTML = elem.outerHTML;
  1095. fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
  1096. }
  1097. if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
  1098. (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
  1099. // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
  1100. destElements = getAll( clone );
  1101. srcElements = getAll( elem );
  1102. // Fix all IE cloning issues
  1103. for ( i = 0; (node = srcElements[i]) != null; ++i ) {
  1104. // Ensure that the destination node is not null; Fixes #9587
  1105. if ( destElements[i] ) {
  1106. fixCloneNodeIssues( node, destElements[i] );
  1107. }
  1108. }
  1109. }
  1110. // Copy the events from the original to the clone
  1111. if ( dataAndEvents ) {
  1112. if ( deepDataAndEvents ) {
  1113. srcElements = srcElements || getAll( elem );
  1114. destElements = destElements || getAll( clone );
  1115. for ( i = 0; (node = srcElements[i]) != null; i++ ) {
  1116. cloneCopyEvent( node, destElements[i] );
  1117. }
  1118. } else {
  1119. cloneCopyEvent( elem, clone );
  1120. }
  1121. }
  1122. // Preserve script evaluation history
  1123. destElements = getAll( clone, "script" );
  1124. if ( destElements.length > 0 ) {
  1125. setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
  1126. }
  1127. destElements = srcElements = node = null;
  1128. // Return the cloned set
  1129. return clone;
  1130. };
  1131. jQuery.contains = function( context, elem ) {
  1132. /// <summary>
  1133. /// Check to see if a DOM element is within another DOM element.
  1134. /// </summary>
  1135. /// <param name="context" domElement="true">
  1136. /// The DOM element that may contain the other element.
  1137. /// </param>
  1138. /// <param name="elem" domElement="true">
  1139. /// The DOM element that may be contained by the other element.
  1140. /// </param>
  1141. /// <returns type="Boolean" />
  1142. // Set document vars if needed
  1143. if ( ( context.ownerDocument || context ) !== document ) {
  1144. setDocument( context );
  1145. }
  1146. return contains( context, elem );
  1147. };
  1148. jQuery.css = function( elem, name, extra, styles ) {
  1149. var num, val, hooks,
  1150. origName = jQuery.camelCase( name );
  1151. // Make sure that we're working with the right name
  1152. name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
  1153. // gets hook for the prefixed version
  1154. // followed by the unprefixed version
  1155. hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
  1156. // If a hook was provided get the computed value from there
  1157. if ( hooks && "get" in hooks ) {
  1158. val = hooks.get( elem, true, extra );
  1159. }
  1160. // Otherwise, if a way to get the computed value exists, use that
  1161. if ( val === undefined ) {
  1162. val = curCSS( elem, name, styles );
  1163. }
  1164. //convert "normal" to computed value
  1165. if ( val === "normal" && name in cssNormalTransform ) {
  1166. val = cssNormalTransform[ name ];
  1167. }
  1168. // Return, converting to number if forced or a qualifier was provided and val looks numeric
  1169. if ( extra === "" || extra ) {
  1170. num = parseFloat( val );
  1171. return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
  1172. }
  1173. return val;
  1174. };
  1175. jQuery.cssHooks = { "opacity": {},
  1176. "height": {},
  1177. "width": {},
  1178. "margin": {},
  1179. "padding": {},
  1180. "borderWidth": {} };
  1181. jQuery.cssNumber = { "columnCount": true,
  1182. "fillOpacity": true,
  1183. "fontWeight": true,
  1184. "lineHeight": true,
  1185. "opacity": true,
  1186. "orphans": true,
  1187. "widows": true,
  1188. "zIndex": true,
  1189. "zoom": true };
  1190. jQuery.cssProps = { "float": 'cssFloat',
  1191. "display": 'display',
  1192. "visibility": 'visibility' };
  1193. jQuery.data = function( elem, name, data ) {
  1194. /// <summary>
  1195. /// 1: Store arbitrary data associated with the specified element. Returns the value that was set.
  1196. /// &#10; 1.1 - jQuery.data(element, key, value)
  1197. /// &#10;2: Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element.
  1198. /// &#10; 2.1 - jQuery.data(element, key)
  1199. /// &#10; 2.2 - jQuery.data(element)
  1200. /// </summary>
  1201. /// <param name="elem" domElement="true">
  1202. /// The DOM element to associate with the data.
  1203. /// </param>
  1204. /// <param name="name" type="String">
  1205. /// A string naming the piece of data to set.
  1206. /// </param>
  1207. /// <param name="data" type="Object">
  1208. /// The new data value.
  1209. /// </param>
  1210. /// <returns type="Object" />
  1211. return internalData( elem, name, data );
  1212. };
  1213. jQuery.dequeue = function( elem, type ) {
  1214. /// <summary>
  1215. /// Execute the next function on the queue for the matched element.
  1216. /// </summary>
  1217. /// <param name="elem" domElement="true">
  1218. /// A DOM element from which to remove and execute a queued function.
  1219. /// </param>
  1220. /// <param name="type" type="String">
  1221. /// A string containing the name of the queue. Defaults to fx, the standard effects queue.
  1222. /// </param>
  1223. /// <returns type="undefined" />
  1224. type = type || "fx";
  1225. var queue = jQuery.queue( elem, type ),
  1226. startLength = queue.length,
  1227. fn = queue.shift(),
  1228. hooks = jQuery._queueHooks( elem, type ),
  1229. next = function() {
  1230. jQuery.dequeue( elem, type );
  1231. };
  1232. // If the fx queue is dequeued, always remove the progress sentinel
  1233. if ( fn === "inprogress" ) {
  1234. fn = queue.shift();
  1235. startLength--;
  1236. }
  1237. hooks.cur = fn;
  1238. if ( fn ) {
  1239. // Add a progress sentinel to prevent the fx queue from being
  1240. // automatically dequeued
  1241. if ( type === "fx" ) {
  1242. queue.unshift( "inprogress" );
  1243. }
  1244. // clear up the last queue stop function
  1245. delete hooks.stop;
  1246. fn.call( elem, next, hooks );
  1247. }
  1248. if ( !startLength && hooks ) {
  1249. hooks.empty.fire();
  1250. }
  1251. };
  1252. jQuery.dir = function( elem, dir, until ) {
  1253. var matched = [],
  1254. cur = elem[ dir ];
  1255. while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
  1256. if ( cur.nodeType === 1 ) {
  1257. matched.push( cur );
  1258. }
  1259. cur = cur[dir];
  1260. }
  1261. return matched;
  1262. };
  1263. jQuery.each = function( obj, callback, args ) {
  1264. /// <summary>
  1265. /// A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.
  1266. /// </summary>
  1267. /// <param name="obj" type="Object">
  1268. /// The object or array to iterate over.
  1269. /// </param>
  1270. /// <param name="callback" type="Function">
  1271. /// The function that will be executed on every object.
  1272. /// </param>
  1273. /// <returns type="Object" />
  1274. var value,
  1275. i = 0,
  1276. length = obj.length,
  1277. isArray = isArraylike( obj );
  1278. if ( args ) {
  1279. if ( isArray ) {
  1280. for ( ; i < length; i++ ) {
  1281. value = callback.apply( obj[ i ], args );
  1282. if ( value === false ) {
  1283. break;
  1284. }
  1285. }
  1286. } else {
  1287. for ( i in obj ) {
  1288. value = callback.apply( obj[ i ], args );
  1289. if ( value === false ) {
  1290. break;
  1291. }
  1292. }
  1293. }
  1294. // A special, fast, case for the most common use of each
  1295. } else {
  1296. if ( isArray ) {
  1297. for ( ; i < length; i++ ) {
  1298. value = callback.call( obj[ i ], i, obj[ i ] );
  1299. if ( value === false ) {
  1300. break;
  1301. }
  1302. }
  1303. } else {
  1304. for ( i in obj ) {
  1305. value = callback.call( obj[ i ], i, obj[ i ] );
  1306. if ( value === false ) {
  1307. break;
  1308. }
  1309. }
  1310. }
  1311. }
  1312. return obj;
  1313. };
  1314. jQuery.easing = {};
  1315. jQuery.error = function( msg ) {
  1316. /// <summary>
  1317. /// Takes a string and throws an exception containing it.
  1318. /// </summary>
  1319. /// <param name="msg" type="String">
  1320. /// The message to send out.
  1321. /// </param>
  1322. throw new Error( msg );
  1323. };
  1324. jQuery.etag = {};
  1325. jQuery.event = { "global": {},
  1326. "props": ['altKey','bubbles','cancelable','ctrlKey','currentTarget','eventPhase','metaKey','relatedTarget','shiftKey','target','timeStamp','view','which'],
  1327. "fixHooks": {},
  1328. "keyHooks": {},
  1329. "mouseHooks": {},
  1330. "special": {},
  1331. "triggered": {} };
  1332. jQuery.expr = { "cacheLength": 50,
  1333. "match": {},
  1334. "attrHandle": {},
  1335. "find": {},
  1336. "relative": {},
  1337. "preFilter": {},
  1338. "filter": {},
  1339. "pseudos": {},
  1340. "filters": {},
  1341. "setFilters": {},
  1342. ":": {} };
  1343. jQuery.extend = function() {
  1344. /// <summary>
  1345. /// Merge the contents of two or more objects together into the first object.
  1346. /// &#10;1 - jQuery.extend(target, object1, objectN)
  1347. /// &#10;2 - jQuery.extend(deep, target, object1, objectN)
  1348. /// </summary>
  1349. /// <param name="" type="Boolean">
  1350. /// If true, the merge becomes recursive (aka. deep copy).
  1351. /// </param>
  1352. /// <param name="" type="Object">
  1353. /// The object to extend. It will receive the new properties.
  1354. /// </param>
  1355. /// <param name="" type="Object">
  1356. /// An object containing additional properties to merge in.
  1357. /// </param>
  1358. /// <param name="" type="Object">
  1359. /// Additional objects containing properties to merge in.
  1360. /// </param>
  1361. /// <returns type="Object" />
  1362. var src, copyIsArray, copy, name, options, clone,
  1363. target = arguments[0] || {},
  1364. i = 1,
  1365. length = arguments.length,
  1366. deep = false;
  1367. // Handle a deep copy situation
  1368. if ( typeof target === "boolean" ) {
  1369. deep = target;
  1370. target = arguments[1] || {};
  1371. // skip the boolean and the target
  1372. i = 2;
  1373. }
  1374. // Handle case when target is a string or something (possible in deep copy)
  1375. if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
  1376. target = {};
  1377. }
  1378. // extend jQuery itself if only one argument is passed
  1379. if ( length === i ) {
  1380. target = this;
  1381. --i;
  1382. }
  1383. for ( ; i < length; i++ ) {
  1384. // Only deal with non-null/undefined values
  1385. if ( (options = arguments[ i ]) != null ) {
  1386. // Extend the base object
  1387. for ( name in options ) {
  1388. src = target[ name ];
  1389. copy = options[ name ];
  1390. // Prevent never-ending loop
  1391. if ( target === copy ) {
  1392. continue;
  1393. }
  1394. // Recurse if we're merging plain objects or arrays
  1395. if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
  1396. if ( copyIsArray ) {
  1397. copyIsArray = false;
  1398. clone = src && jQuery.isArray(src) ? src : [];
  1399. } else {
  1400. clone = src && jQuery.isPlainObject(src) ? src : {};
  1401. }
  1402. // Never move original objects, clone them
  1403. target[ name ] = jQuery.extend( deep, clone, copy );
  1404. // Don't bring in undefined values
  1405. } else if ( copy !== undefined ) {
  1406. target[ name ] = copy;
  1407. }
  1408. }
  1409. }
  1410. }
  1411. // Return the modified object
  1412. return target;
  1413. };
  1414. jQuery.filter = function( expr, elems, not ) {
  1415. var elem = elems[ 0 ];
  1416. if ( not ) {
  1417. expr = ":not(" + expr + ")";
  1418. }
  1419. return elems.length === 1 && elem.nodeType === 1 ?
  1420. jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
  1421. jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
  1422. return elem.nodeType === 1;
  1423. }));
  1424. };
  1425. jQuery.find = function Sizzle( selector, context, results, seed ) {
  1426. var match, elem, m, nodeType,
  1427. // QSA vars
  1428. i, groups, old, nid, newContext, newSelector;
  1429. if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
  1430. setDocument( context );
  1431. }
  1432. context = context || document;
  1433. results = results || [];
  1434. if ( !selector || typeof selector !== "string" ) {
  1435. return results;
  1436. }
  1437. if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
  1438. return [];
  1439. }
  1440. if ( documentIsHTML && !seed ) {
  1441. // Shortcuts
  1442. if ( (match = rquickExpr.exec( selector )) ) {
  1443. // Speed-up: Sizzle("#ID")
  1444. if ( (m = match[1]) ) {
  1445. if ( nodeType === 9 ) {
  1446. elem = context.getElementById( m );
  1447. // Check parentNode to catch when Blackberry 4.6 returns
  1448. // nodes that are no longer in the document #6963
  1449. if ( elem && elem.parentNode ) {
  1450. // Handle the case where IE, Opera, and Webkit return items
  1451. // by name instead of ID
  1452. if ( elem.id === m ) {
  1453. results.push( elem );
  1454. return results;
  1455. }
  1456. } else {
  1457. return results;
  1458. }
  1459. } else {
  1460. // Context is not a document
  1461. if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
  1462. contains( context, elem ) && elem.id === m ) {
  1463. results.push( elem );
  1464. return results;
  1465. }
  1466. }
  1467. // Speed-up: Sizzle("TAG")
  1468. } else if ( match[2] ) {
  1469. push.apply( results, context.getElementsByTagName( selector ) );
  1470. return results;
  1471. // Speed-up: Sizzle(".CLASS")
  1472. } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
  1473. push.apply( results, context.getElementsByClassName( m ) );
  1474. return results;
  1475. }
  1476. }
  1477. // QSA path
  1478. if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
  1479. nid = old = expando;
  1480. newContext = context;
  1481. newSelector = nodeType === 9 && selector;
  1482. // qSA works strangely on Element-rooted queries
  1483. // We can work around this by specifying an extra ID on the root
  1484. // and working up from there (Thanks to Andrew Dupont for the technique)
  1485. // IE 8 doesn't work on object elements
  1486. if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
  1487. groups = tokenize( selector );
  1488. if ( (old = context.getAttribute("id")) ) {
  1489. nid = old.replace( rescape, "\\$&" );
  1490. } else {
  1491. context.setAttribute( "id", nid );
  1492. }
  1493. nid = "[id='" + nid + "'] ";
  1494. i = groups.length;
  1495. while ( i-- ) {
  1496. groups[i] = nid + toSelector( groups[i] );
  1497. }
  1498. newContext = rsibling.test( selector ) && context.parentNode || context;
  1499. newSelector = groups.join(",");
  1500. }
  1501. if ( newSelector ) {
  1502. try {
  1503. push.apply( results,
  1504. newContext.querySelectorAll( newSelector )
  1505. );
  1506. return results;
  1507. } catch(qsaError) {
  1508. } finally {
  1509. if ( !old ) {
  1510. context.removeAttribute("id");
  1511. }
  1512. }
  1513. }
  1514. }
  1515. }
  1516. // All others
  1517. return select( selector.replace( rtrim, "$1" ), context, results, seed );
  1518. };
  1519. jQuery.fn = { "jquery": '1.10.2',
  1520. "selector": '',
  1521. "length": 0 };
  1522. jQuery.fx = function( elem, options, prop, end, easing, unit ) {
  1523. this.elem = elem;
  1524. this.prop = prop;
  1525. this.easing = easing || "swing";
  1526. this.options = options;
  1527. this.start = this.now = this.cur();
  1528. this.end = end;
  1529. this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
  1530. };
  1531. jQuery.get = function( url, data, callback, type ) {
  1532. /// <summary>
  1533. /// Load data from the server using a HTTP GET request.
  1534. /// </summary>
  1535. /// <param name="url" type="String">
  1536. /// A string containing the URL to which the request is sent.
  1537. /// </param>
  1538. /// <param name="data" type="String">
  1539. /// A map or string that is sent to the server with the request.
  1540. /// </param>
  1541. /// <param name="callback" type="Function">
  1542. /// A callback function that is executed if the request succeeds.
  1543. /// </param>
  1544. /// <param name="type" type="String">
  1545. /// The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
  1546. /// </param>
  1547. // shift arguments if data argument was omitted
  1548. if ( jQuery.isFunction( data ) ) {
  1549. type = type || callback;
  1550. callback = data;
  1551. data = undefined;
  1552. }
  1553. return jQuery.ajax({
  1554. url: url,
  1555. type: method,
  1556. dataType: type,
  1557. data: data,
  1558. success: callback
  1559. });
  1560. };
  1561. jQuery.getJSON = function( url, data, callback ) {
  1562. /// <summary>
  1563. /// Load JSON-encoded data from the server using a GET HTTP request.
  1564. /// </summary>
  1565. /// <param name="url" type="String">
  1566. /// A string containing the URL to which the request is sent.
  1567. /// </param>
  1568. /// <param name="data" type="Object">
  1569. /// A map or string that is sent to the server with the request.
  1570. /// </param>
  1571. /// <param name="callback" type="Function">
  1572. /// A callback function that is executed if the request succeeds.
  1573. /// </param>
  1574. return jQuery.get( url, data, callback, "json" );
  1575. };
  1576. jQuery.getScript = function( url, callback ) {
  1577. /// <summary>
  1578. /// Load a JavaScript file from the server using a GET HTTP request, then execute it.
  1579. /// </summary>
  1580. /// <param name="url" type="String">
  1581. /// A string containing the URL to which the request is sent.
  1582. /// </param>
  1583. /// <param name="callback" type="Function">
  1584. /// A callback function that is executed if the request succeeds.
  1585. /// </param>
  1586. return jQuery.get( url, undefined, callback, "script" );
  1587. };
  1588. jQuery.globalEval = function( data ) {
  1589. /// <summary>
  1590. /// Execute some JavaScript code globally.
  1591. /// </summary>
  1592. /// <param name="data" type="String">
  1593. /// The JavaScript code to execute.
  1594. /// </param>
  1595. if ( data && jQuery.trim( data ) ) {
  1596. // We use execScript on Internet Explorer
  1597. // We use an anonymous function so that context is window
  1598. // rather than jQuery in Firefox
  1599. ( window.execScript || function( data ) {
  1600. window[ "eval" ].call( window, data );
  1601. } )( data );
  1602. }
  1603. };
  1604. jQuery.grep = function( elems, callback, inv ) {
  1605. /// <summary>
  1606. /// Finds the elements of an array which satisfy a filter function. The original array is not affected.
  1607. /// </summary>
  1608. /// <param name="elems" type="Array">
  1609. /// The array to search through.
  1610. /// </param>
  1611. /// <param name="callback" type="Function">
  1612. /// The function to process each item against. The first argument to the function is the item, and the second argument is the index. The function should return a Boolean value. this will be the global window object.
  1613. /// </param>
  1614. /// <param name="inv" type="Boolean">
  1615. /// If "invert" is false, or not provided, then the function returns an array consisting of all elements for which "callback" returns true. If "invert" is true, then the function returns an array consisting of all elements for which "callback" returns false.
  1616. /// </param>
  1617. /// <returns type="Array" />
  1618. var retVal,
  1619. ret = [],
  1620. i = 0,
  1621. length = elems.length;
  1622. inv = !!inv;
  1623. // Go through the array, only saving the items
  1624. // that pass the validator function
  1625. for ( ; i < length; i++ ) {
  1626. retVal = !!callback( elems[ i ], i );
  1627. if ( inv !== retVal ) {
  1628. ret.push( elems[ i ] );
  1629. }
  1630. }
  1631. return ret;
  1632. };
  1633. jQuery.guid = 1;
  1634. jQuery.hasData = function( elem ) {
  1635. /// <summary>
  1636. /// Determine whether an element has any jQuery data associated with it.
  1637. /// </summary>
  1638. /// <param name="elem" domElement="true">
  1639. /// A DOM element to be checked for data.
  1640. /// </param>
  1641. /// <returns type="Boolean" />
  1642. elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
  1643. return !!elem && !isEmptyDataObject( elem );
  1644. };
  1645. jQuery.holdReady = function( hold ) {
  1646. /// <summary>
  1647. /// Holds or releases the execution of jQuery's ready event.
  1648. /// </summary>
  1649. /// <param name="hold" type="Boolean">
  1650. /// Indicates whether the ready hold is being requested or released
  1651. /// </param>
  1652. /// <returns type="undefined" />
  1653. if ( hold ) {
  1654. jQuery.readyWait++;
  1655. } else {
  1656. jQuery.ready( true );
  1657. }
  1658. };
  1659. jQuery.inArray = function( elem, arr, i ) {
  1660. /// <summary>
  1661. /// Search for a specified value within an array and return its index (or -1 if not found).
  1662. /// </summary>
  1663. /// <param name="elem" type="Object">
  1664. /// The value to search for.
  1665. /// </param>
  1666. /// <param name="arr" type="Array">
  1667. /// An array through which to search.
  1668. /// </param>
  1669. /// <param name="i" type="Number">
  1670. /// The index of the array at which to begin the search. The default is 0, which will search the whole array.
  1671. /// </param>
  1672. /// <returns type="Number" />
  1673. var len;
  1674. if ( arr ) {
  1675. if ( core_indexOf ) {
  1676. return core_indexOf.call( arr, elem, i );
  1677. }
  1678. len = arr.length;
  1679. i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
  1680. for ( ; i < len; i++ ) {
  1681. // Skip accessing in sparse arrays
  1682. if ( i in arr && arr[ i ] === elem ) {
  1683. return i;
  1684. }
  1685. }
  1686. }
  1687. return -1;
  1688. };
  1689. jQuery.isEmptyObject = function( obj ) {
  1690. /// <summary>
  1691. /// Check to see if an object is empty (contains no properties).
  1692. /// </summary>
  1693. /// <param name="obj" type="Object">
  1694. /// The object that will be checked to see if it's empty.
  1695. /// </param>
  1696. /// <returns type="Boolean" />
  1697. var name;
  1698. for ( name in obj ) {
  1699. return false;
  1700. }
  1701. return true;
  1702. };
  1703. jQuery.isFunction = function( obj ) {
  1704. /// <summary>
  1705. /// Determine if the argument passed is a Javascript function object.
  1706. /// </summary>
  1707. /// <param name="obj" type="Object">
  1708. /// Object to test whether or not it is a function.
  1709. /// </param>
  1710. /// <returns type="boolean" />
  1711. return jQuery.type(obj) === "function";
  1712. };
  1713. jQuery.isNumeric = function( obj ) {
  1714. /// <summary>
  1715. /// Determines whether its argument is a number.
  1716. /// </summary>
  1717. /// <param name="obj" type="Object">
  1718. /// The value to be tested.
  1719. /// </param>
  1720. /// <returns type="Boolean" />
  1721. return !isNaN( parseFloat(obj) ) && isFinite( obj );
  1722. };
  1723. jQuery.isPlainObject = function( obj ) {
  1724. /// <summary>
  1725. /// Check to see if an object is a plain object (created using "{}" or "new Object").
  1726. /// </summary>
  1727. /// <param name="obj" type="Object">
  1728. /// The object that will be checked to see if it's a plain object.
  1729. /// </param>
  1730. /// <returns type="Boolean" />
  1731. var key;
  1732. // Must be an Object.
  1733. // Because of IE, we also have to check the presence of the constructor property.
  1734. // Make sure that DOM nodes and window objects don't pass through, as well
  1735. if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
  1736. return false;
  1737. }
  1738. try {
  1739. // Not own constructor property must be Object
  1740. if ( obj.constructor &&
  1741. !core_hasOwn.call(obj, "constructor") &&
  1742. !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
  1743. return false;
  1744. }
  1745. } catch ( e ) {
  1746. // IE8,9 Will throw exceptions on certain host objects #9897
  1747. return false;
  1748. }
  1749. // Support: IE<9
  1750. // Handle iteration over inherited properties before own properties.
  1751. if ( jQuery.support.ownLast ) {
  1752. for ( key in obj ) {
  1753. return core_hasOwn.call( obj, key );
  1754. }
  1755. }
  1756. // Own properties are enumerated firstly, so to speed up,
  1757. // if last one is own, then all properties are own.
  1758. for ( key in obj ) {}
  1759. return key === undefined || core_hasOwn.call( obj, key );
  1760. };
  1761. jQuery.isReady = true;
  1762. jQuery.isWindow = function( obj ) {
  1763. /// <summary>
  1764. /// Determine whether the argument is a window.
  1765. /// </summary>
  1766. /// <param name="obj" type="Object">
  1767. /// Object to test whether or not it is a window.
  1768. /// </param>
  1769. /// <returns type="boolean" />
  1770. /* jshint eqeqeq: false */
  1771. return obj != null && obj == obj.window;
  1772. };
  1773. jQuery.isXMLDoc = function( elem ) {
  1774. /// <summary>
  1775. /// Check to see if a DOM node is within an XML document (or is an XML document).
  1776. /// </summary>
  1777. /// <param name="elem" domElement="true">
  1778. /// The DOM node that will be checked to see if it's in an XML document.
  1779. /// </param>
  1780. /// <returns type="Boolean" />
  1781. // documentElement is verified for cases where it doesn't yet exist
  1782. // (such as loading iframes in IE - #4833)
  1783. var documentElement = elem && (elem.ownerDocument || elem).documentElement;
  1784. return documentElement ? documentElement.nodeName !== "HTML" : false;
  1785. };
  1786. jQuery.lastModified = {};
  1787. jQuery.makeArray = function( arr, results ) {
  1788. /// <summary>
  1789. /// Convert an array-like object into a true JavaScript array.
  1790. /// </summary>
  1791. /// <param name="arr" type="Object">
  1792. /// Any object to turn into a native Array.
  1793. /// </param>
  1794. /// <returns type="Array" />
  1795. var ret = results || [];
  1796. if ( arr != null ) {
  1797. if ( isArraylike( Object(arr) ) ) {
  1798. jQuery.merge( ret,
  1799. typeof arr === "string" ?
  1800. [ arr ] : arr
  1801. );
  1802. } else {
  1803. core_push.call( ret, arr );
  1804. }
  1805. }
  1806. return ret;
  1807. };
  1808. jQuery.map = function( elems, callback, arg ) {
  1809. /// <summary>
  1810. /// Translate all items in an array or object to new array of items.
  1811. /// &#10;1 - jQuery.map(array, callback(elementOfArray, indexInArray))
  1812. /// &#10;2 - jQuery.map(arrayOrObject, callback( value, indexOrKey ))
  1813. /// </summary>
  1814. /// <param name="elems" type="Array">
  1815. /// The Array to translate.
  1816. /// </param>
  1817. /// <param name="callback" type="Function">
  1818. /// The function to process each item against. The first argument to the function is the array item, the second argument is the index in array The function can return any value. Within the function, this refers to the global (window) object.
  1819. /// </param>
  1820. /// <returns type="Array" />
  1821. var value,
  1822. i = 0,
  1823. length = elems.length,
  1824. isArray = isArraylike( elems ),
  1825. ret = [];
  1826. // Go through the array, translating each of the items to their
  1827. if ( isArray ) {
  1828. for ( ; i < length; i++ ) {
  1829. value = callback( elems[ i ], i, arg );
  1830. if ( value != null ) {
  1831. ret[ ret.length ] = value;
  1832. }
  1833. }
  1834. // Go through every key on the object,
  1835. } else {
  1836. for ( i in elems ) {
  1837. value = callback( elems[ i ], i, arg );
  1838. if ( value != null ) {
  1839. ret[ ret.length ] = value;
  1840. }
  1841. }
  1842. }
  1843. // Flatten any nested arrays
  1844. return core_concat.apply( [], ret );
  1845. };
  1846. jQuery.merge = function( first, second ) {
  1847. /// <summary>
  1848. /// Merge the contents of two arrays together into the first array.
  1849. /// </summary>
  1850. /// <param name="first" type="Array">
  1851. /// The first array to merge, the elements of second added.
  1852. /// </param>
  1853. /// <param name="second" type="Array">
  1854. /// The second array to merge into the first, unaltered.
  1855. /// </param>
  1856. /// <returns type="Array" />
  1857. var l = second.length,
  1858. i = first.length,
  1859. j = 0;
  1860. if ( typeof l === "number" ) {
  1861. for ( ; j < l; j++ ) {
  1862. first[ i++ ] = second[ j ];
  1863. }
  1864. } else {
  1865. while ( second[j] !== undefined ) {
  1866. first[ i++ ] = second[ j++ ];
  1867. }
  1868. }
  1869. first.length = i;
  1870. return first;
  1871. };
  1872. jQuery.noConflict = function( deep ) {
  1873. /// <summary>
  1874. /// Relinquish jQuery's control of the $ variable.
  1875. /// </summary>
  1876. /// <param name="deep" type="Boolean">
  1877. /// A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself).
  1878. /// </param>
  1879. /// <returns type="Object" />
  1880. if ( window.$ === jQuery ) {
  1881. window.$ = _$;
  1882. }
  1883. if ( deep && window.jQuery === jQuery ) {
  1884. window.jQuery = _jQuery;
  1885. }
  1886. return jQuery;
  1887. };
  1888. jQuery.noData = { "applet": true,
  1889. "embed": true,
  1890. "object": 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' };
  1891. jQuery.nodeName = function( elem, name ) {
  1892. return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
  1893. };
  1894. jQuery.noop = function() {
  1895. /// <summary>
  1896. /// An empty function.
  1897. /// </summary>
  1898. /// <returns type="Function" />
  1899. };
  1900. jQuery.now = function() {
  1901. /// <summary>
  1902. /// Return a number representing the current time.
  1903. /// </summary>
  1904. /// <returns type="Number" />
  1905. return ( new Date() ).getTime();
  1906. };
  1907. jQuery.offset = {};
  1908. jQuery.param = function( a, traditional ) {
  1909. /// <summary>
  1910. /// Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
  1911. /// &#10;1 - jQuery.param(obj)
  1912. /// &#10;2 - jQuery.param(obj, traditional)
  1913. /// </summary>
  1914. /// <param name="a" type="Object">
  1915. /// An array or object to serialize.
  1916. /// </param>
  1917. /// <param name="traditional" type="Boolean">
  1918. /// A Boolean indicating whether to perform a traditional "shallow" serialization.
  1919. /// </param>
  1920. /// <returns type="String" />
  1921. var prefix,
  1922. s = [],
  1923. add = function( key, value ) {
  1924. // If value is a function, invoke it and return its value
  1925. value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
  1926. s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
  1927. };
  1928. // Set traditional to true for jQuery <= 1.3.2 behavior.
  1929. if ( traditional === undefined ) {
  1930. traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
  1931. }
  1932. // If an array was passed in, assume that it is an array of form elements.
  1933. if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
  1934. // Serialize the form elements
  1935. jQuery.each( a, function() {
  1936. add( this.name, this.value );
  1937. });
  1938. } else {
  1939. // If traditional, encode the "old" way (the way 1.3.2 or older
  1940. // did it), otherwise encode params recursively.
  1941. for ( prefix in a ) {
  1942. buildParams( prefix, a[ prefix ], traditional, add );
  1943. }
  1944. }
  1945. // Return the resulting serialization
  1946. return s.join( "&" ).replace( r20, "+" );
  1947. };
  1948. jQuery.parseHTML = function( data, context, keepScripts ) {
  1949. if ( !data || typeof data !== "string" ) {
  1950. return null;
  1951. }
  1952. if ( typeof context === "boolean" ) {
  1953. keepScripts = context;
  1954. context = false;
  1955. }
  1956. context = context || document;
  1957. var parsed = rsingleTag.exec( data ),
  1958. scripts = !keepScripts && [];
  1959. // Single tag
  1960. if ( parsed ) {
  1961. return [ context.createElement( parsed[1] ) ];
  1962. }
  1963. parsed = jQuery.buildFragment( [ data ], context, scripts );
  1964. if ( scripts ) {
  1965. jQuery( scripts ).remove();
  1966. }
  1967. return jQuery.merge( [], parsed.childNodes );
  1968. };
  1969. jQuery.parseJSON = function( data ) {
  1970. /// <summary>
  1971. /// Takes a well-formed JSON string and returns the resulting JavaScript object.
  1972. /// </summary>
  1973. /// <param name="data" type="String">
  1974. /// The JSON string to parse.
  1975. /// </param>
  1976. /// <returns type="Object" />
  1977. // Attempt to parse using the native JSON parser first
  1978. if ( window.JSON && window.JSON.parse ) {
  1979. return window.JSON.parse( data );
  1980. }
  1981. if ( data === null ) {
  1982. return data;
  1983. }
  1984. if ( typeof data === "string" ) {
  1985. // Make sure leading/trailing whitespace is removed (IE can't handle it)
  1986. data = jQuery.trim( data );
  1987. if ( data ) {
  1988. // Make sure the incoming data is actual JSON
  1989. // Logic borrowed from http://json.org/json2.js
  1990. if ( rvalidchars.test( data.replace( rvalidescape, "@" )
  1991. .replace( rvalidtokens, "]" )
  1992. .replace( rvalidbraces, "")) ) {
  1993. return ( new Function( "return " + data ) )();
  1994. }
  1995. }
  1996. }
  1997. jQuery.error( "Invalid JSON: " + data );
  1998. };
  1999. jQuery.parseXML = function( data ) {
  2000. /// <summary>
  2001. /// Parses a string into an XML document.
  2002. /// </summary>
  2003. /// <param name="data" type="String">
  2004. /// a well-formed XML string to be parsed
  2005. /// </param>
  2006. /// <returns type="XMLDocument" />
  2007. var xml, tmp;
  2008. if ( !data || typeof data !== "string" ) {
  2009. return null;
  2010. }
  2011. try {
  2012. if ( window.DOMParser ) { // Standard
  2013. tmp = new DOMParser();
  2014. xml = tmp.parseFromString( data , "text/xml" );
  2015. } else { // IE
  2016. xml = new ActiveXObject( "Microsoft.XMLDOM" );
  2017. xml.async = "false";
  2018. xml.loadXML( data );
  2019. }
  2020. } catch( e ) {
  2021. xml = undefined;
  2022. }
  2023. if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
  2024. jQuery.error( "Invalid XML: " + data );
  2025. }
  2026. return xml;
  2027. };
  2028. jQuery.post = function( url, data, callback, type ) {
  2029. /// <summary>
  2030. /// Load data from the server using a HTTP POST request.
  2031. /// </summary>
  2032. /// <param name="url" type="String">
  2033. /// A string containing the URL to which the request is sent.
  2034. /// </param>
  2035. /// <param name="data" type="String">
  2036. /// A map or string that is sent to the server with the request.
  2037. /// </param>
  2038. /// <param name="callback" type="Function">
  2039. /// A callback function that is executed if the request succeeds.
  2040. /// </param>
  2041. /// <param name="type" type="String">
  2042. /// The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
  2043. /// </param>
  2044. // shift arguments if data argument was omitted
  2045. if ( jQuery.isFunction( data ) ) {
  2046. type = type || callback;
  2047. callback = data;
  2048. data = undefined;
  2049. }
  2050. return jQuery.ajax({
  2051. url: url,
  2052. type: method,
  2053. dataType: type,
  2054. data: data,
  2055. success: callback
  2056. });
  2057. };
  2058. jQuery.prop = function( elem, name, value ) {
  2059. var ret, hooks, notxml,
  2060. nType = elem.nodeType;
  2061. // don't get/set properties on text, comment and attribute nodes
  2062. if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
  2063. return;
  2064. }
  2065. notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
  2066. if ( notxml ) {
  2067. // Fix name and attach hooks
  2068. name = jQuery.propFix[ name ] || name;
  2069. hooks = jQuery.propHooks[ name ];
  2070. }
  2071. if ( value !== undefined ) {
  2072. return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
  2073. ret :
  2074. ( elem[ name ] = value );
  2075. } else {
  2076. return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
  2077. ret :
  2078. elem[ name ];
  2079. }
  2080. };
  2081. jQuery.propFix = { "for": 'htmlFor',
  2082. "class": 'className',
  2083. "tabindex": {},
  2084. "readonly": {},
  2085. "maxlength": {},
  2086. "cellspacing": {},
  2087. "cellpadding": {},
  2088. "rowspan": {},
  2089. "colspan": {},
  2090. "usemap": {},
  2091. "frameborder": {},
  2092. "contenteditable": {} };
  2093. jQuery.propHooks = { "tabIndex": {},
  2094. "selected": {} };
  2095. jQuery.proxy = function( fn, context ) {
  2096. /// <summary>
  2097. /// Takes a function and returns a new one that will always have a particular context.
  2098. /// &#10;1 - jQuery.proxy(function, context)
  2099. /// &#10;2 - jQuery.proxy(context, name)
  2100. /// </summary>
  2101. /// <param name="fn" type="Function">
  2102. /// The function whose context will be changed.
  2103. /// </param>
  2104. /// <param name="context" type="Object">
  2105. /// The object to which the context (this) of the function should be set.
  2106. /// </param>
  2107. /// <returns type="Function" />
  2108. var args, proxy, tmp;
  2109. if ( typeof context === "string" ) {
  2110. tmp = fn[ context ];
  2111. context = fn;
  2112. fn = tmp;
  2113. }
  2114. // Quick check to determine if target is callable, in the spec
  2115. // this throws a TypeError, but we will just return undefined.
  2116. if ( !jQuery.isFunction( fn ) ) {
  2117. return undefined;
  2118. }
  2119. // Simulated bind
  2120. args = core_slice.call( arguments, 2 );
  2121. proxy = function() {
  2122. return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
  2123. };
  2124. // Set the guid of unique handler to the same of original handler, so it can be removed
  2125. proxy.guid = fn.guid = fn.guid || jQuery.guid++;
  2126. return proxy;
  2127. };
  2128. jQuery.queue = function( elem, type, data ) {
  2129. /// <summary>
  2130. /// 1: Show the queue of functions to be executed on the matched element.
  2131. /// &#10; 1.1 - jQuery.queue(element, queueName)
  2132. /// &#10;2: Manipulate the queue of functions to be executed on the matched element.
  2133. /// &#10; 2.1 - jQuery.queue(element, queueName, newQueue)
  2134. /// &#10; 2.2 - jQuery.queue(element, queueName, callback())
  2135. /// </summary>
  2136. /// <param name="elem" domElement="true">
  2137. /// A DOM element where the array of queued functions is attached.
  2138. /// </param>
  2139. /// <param name="type" type="String">
  2140. /// A string containing the name of the queue. Defaults to fx, the standard effects queue.
  2141. /// </param>
  2142. /// <param name="data" type="Array">
  2143. /// An array of functions to replace the current queue contents.
  2144. /// </param>
  2145. /// <returns type="jQuery" />
  2146. var queue;
  2147. if ( elem ) {
  2148. type = ( type || "fx" ) + "queue";
  2149. queue = jQuery._data( elem, type );
  2150. // Speed up dequeue by getting out quickly if this is just a lookup
  2151. if ( data ) {
  2152. if ( !queue || jQuery.isArray(data) ) {
  2153. queue = jQuery._data( elem, type, jQuery.makeArray(data) );
  2154. } else {
  2155. queue.push( data );
  2156. }
  2157. }
  2158. return queue || [];
  2159. }
  2160. };
  2161. jQuery.ready = function( wait ) {
  2162. // Abort if there are pending holds or we're already ready
  2163. if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
  2164. return;
  2165. }
  2166. // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
  2167. if ( !document.body ) {
  2168. return setTimeout( jQuery.ready );
  2169. }
  2170. // Remember that the DOM is ready
  2171. jQuery.isReady = true;
  2172. // If a normal DOM Ready event fired, decrement, and wait if need be
  2173. if ( wait !== true && --jQuery.readyWait > 0 ) {
  2174. return;
  2175. }
  2176. // If there are functions bound, to execute
  2177. readyList.resolveWith( document, [ jQuery ] );
  2178. // Trigger any bound ready events
  2179. if ( jQuery.fn.trigger ) {
  2180. jQuery( document ).trigger("ready").off("ready");
  2181. }
  2182. };
  2183. jQuery.readyWait = 0;
  2184. jQuery.removeAttr = function( elem, value ) {
  2185. var name, propName,
  2186. i = 0,
  2187. attrNames = value && value.match( core_rnotwhite );
  2188. if ( attrNames && elem.nodeType === 1 ) {
  2189. while ( (name = attrNames[i++]) ) {
  2190. propName = jQuery.propFix[ name ] || name;
  2191. // Boolean attributes get special treatment (#10870)
  2192. if ( jQuery.expr.match.bool.test( name ) ) {
  2193. // Set corresponding property to false
  2194. if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
  2195. elem[ propName ] = false;
  2196. // Support: IE<9
  2197. // Also clear defaultChecked/defaultSelected (if appropriate)
  2198. } else {
  2199. elem[ jQuery.camelCase( "default-" + name ) ] =
  2200. elem[ propName ] = false;
  2201. }
  2202. // See #9699 for explanation of this approach (setting first, then removal)
  2203. } else {
  2204. jQuery.attr( elem, name, "" );
  2205. }
  2206. elem.removeAttribute( getSetAttribute ? name : propName );
  2207. }
  2208. }
  2209. };
  2210. jQuery.removeData = function( elem, name ) {
  2211. /// <summary>
  2212. /// Remove a previously-stored piece of data.
  2213. /// </summary>
  2214. /// <param name="elem" domElement="true">
  2215. /// A DOM element from which to remove data.
  2216. /// </param>
  2217. /// <param name="name" type="String">
  2218. /// A string naming the piece of data to remove.
  2219. /// </param>
  2220. /// <returns type="jQuery" />
  2221. return internalRemoveData( elem, name );
  2222. };
  2223. jQuery.removeEvent = function( elem, type, handle ) {
  2224. if ( elem.removeEventListener ) {
  2225. elem.removeEventListener( type, handle, false );
  2226. }
  2227. };
  2228. jQuery.sibling = function( n, elem ) {
  2229. var r = [];
  2230. for ( ; n; n = n.nextSibling ) {
  2231. if ( n.nodeType === 1 && n !== elem ) {
  2232. r.push( n );
  2233. }
  2234. }
  2235. return r;
  2236. };
  2237. jQuery.speed = function( speed, easing, fn ) {
  2238. var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
  2239. complete: fn || !fn && easing ||
  2240. jQuery.isFunction( speed ) && speed,
  2241. duration: speed,
  2242. easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
  2243. };
  2244. opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
  2245. opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
  2246. // normalize opt.queue - true/undefined/null -> "fx"
  2247. if ( opt.queue == null || opt.queue === true ) {
  2248. opt.queue = "fx";
  2249. }
  2250. // Queueing
  2251. opt.old = opt.complete;
  2252. opt.complete = function() {
  2253. if ( jQuery.isFunction( opt.old ) ) {
  2254. opt.old.call( this );
  2255. }
  2256. if ( opt.queue ) {
  2257. jQuery.dequeue( this, opt.queue );
  2258. }
  2259. };
  2260. return opt;
  2261. };
  2262. jQuery.style = function( elem, name, value, extra ) {
  2263. // Don't set styles on text and comment nodes
  2264. if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
  2265. return;
  2266. }
  2267. // Make sure that we're working with the right name
  2268. var ret, type, hooks,
  2269. origName = jQuery.camelCase( name ),
  2270. style = elem.style;
  2271. name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
  2272. // gets hook for the prefixed version
  2273. // followed by the unprefixed version
  2274. hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
  2275. // Check if we're setting a value
  2276. if ( value !== undefined ) {
  2277. type = typeof value;
  2278. // convert relative number strings (+= or -=) to relative numbers. #7345
  2279. if ( type === "string" && (ret = rrelNum.exec( value )) ) {
  2280. value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
  2281. // Fixes bug #9237
  2282. type = "number";
  2283. }
  2284. // Make sure that NaN and null values aren't set. See: #7116
  2285. if ( value == null || type === "number" && isNaN( value ) ) {
  2286. return;
  2287. }
  2288. // If a number was passed in, add 'px' to the (except for certain CSS properties)
  2289. if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
  2290. value += "px";
  2291. }
  2292. // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
  2293. // but it would mean to define eight (for every problematic property) identical functions
  2294. if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
  2295. style[ name ] = "inherit";
  2296. }
  2297. // If a hook was provided, use that value, otherwise just set the specified value
  2298. if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
  2299. // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
  2300. // Fixes bug #5509
  2301. try {
  2302. style[ name ] = value;
  2303. } catch(e) {}
  2304. }
  2305. } else {
  2306. // If a hook was provided get the non-computed value from there
  2307. if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
  2308. return ret;
  2309. }
  2310. // Otherwise just get the value from the style object
  2311. return style[ name ];
  2312. }
  2313. };
  2314. jQuery.support = { "getSetAttribute": true,
  2315. "leadingWhitespace": true,
  2316. "tbody": true,
  2317. "htmlSerialize": true,
  2318. "style": true,
  2319. "hrefNormalized": true,
  2320. "opacity": true,
  2321. "cssFloat": true,
  2322. "checkOn": true,
  2323. "optSelected": false,
  2324. "enctype": true,
  2325. "html5Clone": true,
  2326. "inlineBlockNeedsLayout": false,
  2327. "shrinkWrapBlocks": false,
  2328. "pixelPosition": true,
  2329. "deleteExpando": true,
  2330. "noCloneEvent": true,
  2331. "reliableMarginRight": true,
  2332. "boxSizingReliable": false,
  2333. "noCloneChecked": false,
  2334. "optDisabled": true,
  2335. "input": true,
  2336. "radioValue": false,
  2337. "appendChecked": true,
  2338. "checkClone": true,
  2339. "submitBubbles": true,
  2340. "changeBubbles": true,
  2341. "focusinBubbles": true,
  2342. "clearCloneStyle": false,
  2343. "ownLast": false,
  2344. "cors": true,
  2345. "ajax": true,
  2346. "reliableHiddenOffsets": true,
  2347. "boxSizing": true };
  2348. jQuery.swap = function( elem, options, callback, args ) {
  2349. var ret, name,
  2350. old = {};
  2351. // Remember the old values, and insert the new ones
  2352. for ( name in options ) {
  2353. old[ name ] = elem.style[ name ];
  2354. elem.style[ name ] = options[ name ];
  2355. }
  2356. ret = callback.apply( elem, args || [] );
  2357. // Revert the old values
  2358. for ( name in options ) {
  2359. elem.style[ name ] = old[ name ];
  2360. }
  2361. return ret;
  2362. };
  2363. jQuery.text = function( elem ) {
  2364. var node,
  2365. ret = "",
  2366. i = 0,
  2367. nodeType = elem.nodeType;
  2368. if ( !nodeType ) {
  2369. // If no nodeType, this is expected to be an array
  2370. for ( ; (node = elem[i]); i++ ) {
  2371. // Do not traverse comment nodes
  2372. ret += getText( node );
  2373. }
  2374. } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
  2375. // Use textContent for elements
  2376. // innerText usage removed for consistency of new lines (see #11153)
  2377. if ( typeof elem.textContent === "string" ) {
  2378. return elem.textContent;
  2379. } else {
  2380. // Traverse its children
  2381. for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
  2382. ret += getText( elem );
  2383. }
  2384. }
  2385. } else if ( nodeType === 3 || nodeType === 4 ) {
  2386. return elem.nodeValue;
  2387. }
  2388. // Do not include comment or processing instruction nodes
  2389. return ret;
  2390. };
  2391. jQuery.trim = function( text ) {
  2392. /// <summary>
  2393. /// Remove the whitespace from the beginning and end of a string.
  2394. /// </summary>
  2395. /// <param name="text" type="String">
  2396. /// The string to trim.
  2397. /// </param>
  2398. /// <returns type="String" />
  2399. return text == null ?
  2400. "" :
  2401. core_trim.call( text );
  2402. };
  2403. jQuery.type = function( obj ) {
  2404. /// <summary>
  2405. /// Determine the internal JavaScript [[Class]] of an object.
  2406. /// </summary>
  2407. /// <param name="obj" type="Object">
  2408. /// Object to get the internal JavaScript [[Class]] of.
  2409. /// </param>
  2410. /// <returns type="String" />
  2411. if ( obj == null ) {
  2412. return String( obj );
  2413. }
  2414. return typeof obj === "object" || typeof obj === "function" ?
  2415. class2type[ core_toString.call(obj) ] || "object" :
  2416. typeof obj;
  2417. };
  2418. jQuery.unique = function( results ) {
  2419. /// <summary>
  2420. /// Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers.
  2421. /// </summary>
  2422. /// <param name="results" type="Array">
  2423. /// The Array of DOM elements.
  2424. /// </param>
  2425. /// <returns type="Array" />
  2426. var elem,
  2427. duplicates = [],
  2428. j = 0,
  2429. i = 0;
  2430. // Unless we *know* we can detect duplicates, assume their presence
  2431. hasDuplicate = !support.detectDuplicates;
  2432. sortInput = !support.sortStable && results.slice( 0 );
  2433. results.sort( sortOrder );
  2434. if ( hasDuplicate ) {
  2435. while ( (elem = results[i++]) ) {
  2436. if ( elem === results[ i ] ) {
  2437. j = duplicates.push( i );
  2438. }
  2439. }
  2440. while ( j-- ) {
  2441. results.splice( duplicates[ j ], 1 );
  2442. }
  2443. }
  2444. return results;
  2445. };
  2446. jQuery.valHooks = { "option": {},
  2447. "select": {},
  2448. "radio": {},
  2449. "checkbox": {} };
  2450. jQuery.when = function( subordinate /* , ..., subordinateN */ ) {
  2451. /// <summary>
  2452. /// Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events.
  2453. /// </summary>
  2454. /// <param name="subordinate/*" type="Deferred">
  2455. /// One or more Deferred objects, or plain JavaScript objects.
  2456. /// </param>
  2457. /// <returns type="Promise" />
  2458. var i = 0,
  2459. resolveValues = core_slice.call( arguments ),
  2460. length = resolveValues.length,
  2461. // the count of uncompleted subordinates
  2462. remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
  2463. // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
  2464. deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
  2465. // Update function for both resolve and progress values
  2466. updateFunc = function( i, contexts, values ) {
  2467. return function( value ) {
  2468. contexts[ i ] = this;
  2469. values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
  2470. if( values === progressValues ) {
  2471. deferred.notifyWith( contexts, values );
  2472. } else if ( !( --remaining ) ) {
  2473. deferred.resolveWith( contexts, values );
  2474. }
  2475. };
  2476. },
  2477. progressValues, progressContexts, resolveContexts;
  2478. // add listeners to Deferred subordinates; treat others as resolved
  2479. if ( length > 1 ) {
  2480. progressValues = new Array( length );
  2481. progressContexts = new Array( length );
  2482. resolveContexts = new Array( length );
  2483. for ( ; i < length; i++ ) {
  2484. if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
  2485. resolveValues[ i ].promise()
  2486. .done( updateFunc( i, resolveContexts, resolveValues ) )
  2487. .fail( deferred.reject )
  2488. .progress( updateFunc( i, progressContexts, progressValues ) );
  2489. } else {
  2490. --remaining;
  2491. }
  2492. }
  2493. }
  2494. // if we're not waiting on anything, resolve the master
  2495. if ( !remaining ) {
  2496. deferred.resolveWith( resolveContexts, resolveValues );
  2497. }
  2498. return deferred.promise();
  2499. };
  2500. jQuery.Event.prototype.isDefaultPrevented = function returnFalse() {
  2501. /// <summary>
  2502. /// Returns whether event.preventDefault() was ever called on this event object.
  2503. /// </summary>
  2504. /// <returns type="Boolean" />
  2505. return false;
  2506. };
  2507. jQuery.Event.prototype.isImmediatePropagationStopped = function returnFalse() {
  2508. /// <summary>
  2509. /// Returns whether event.stopImmediatePropagation() was ever called on this event object.
  2510. /// </summary>
  2511. /// <returns type="Boolean" />
  2512. return false;
  2513. };
  2514. jQuery.Event.prototype.isPropagationStopped = function returnFalse() {
  2515. /// <summary>
  2516. /// Returns whether event.stopPropagation() was ever called on this event object.
  2517. /// </summary>
  2518. /// <returns type="Boolean" />
  2519. return false;
  2520. };
  2521. jQuery.Event.prototype.preventDefault = function() {
  2522. /// <summary>
  2523. /// If this method is called, the default action of the event will not be triggered.
  2524. /// </summary>
  2525. /// <returns type="undefined" />
  2526. var e = this.originalEvent;
  2527. this.isDefaultPrevented = returnTrue;
  2528. if ( !e ) {
  2529. return;
  2530. }
  2531. // If preventDefault exists, run it on the original event
  2532. if ( e.preventDefault ) {
  2533. e.preventDefault();
  2534. // Support: IE
  2535. // Otherwise set the returnValue property of the original event to false
  2536. } else {
  2537. e.returnValue = false;
  2538. }
  2539. };
  2540. jQuery.Event.prototype.stopImmediatePropagation = function() {
  2541. /// <summary>
  2542. /// Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree.
  2543. /// </summary>
  2544. this.isImmediatePropagationStopped = returnTrue;
  2545. this.stopPropagation();
  2546. };
  2547. jQuery.Event.prototype.stopPropagation = function() {
  2548. /// <summary>
  2549. /// Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event.
  2550. /// </summary>
  2551. var e = this.originalEvent;
  2552. this.isPropagationStopped = returnTrue;
  2553. if ( !e ) {
  2554. return;
  2555. }
  2556. // If stopPropagation exists, run it on the original event
  2557. if ( e.stopPropagation ) {
  2558. e.stopPropagation();
  2559. }
  2560. // Support: IE
  2561. // Set the cancelBubble property of the original event to true
  2562. e.cancelBubble = true;
  2563. };
  2564. jQuery.prototype.add = function( selector, context ) {
  2565. /// <summary>
  2566. /// Add elements to the set of matched elements.
  2567. /// &#10;1 - add(selector)
  2568. /// &#10;2 - add(elements)
  2569. /// &#10;3 - add(html)
  2570. /// &#10;4 - add(jQuery object)
  2571. /// &#10;5 - add(selector, context)
  2572. /// </summary>
  2573. /// <param name="selector" type="String">
  2574. /// A string representing a selector expression to find additional elements to add to the set of matched elements.
  2575. /// </param>
  2576. /// <param name="context" domElement="true">
  2577. /// The point in the document at which the selector should begin matching; similar to the context argument of the $(selector, context) method.
  2578. /// </param>
  2579. /// <returns type="jQuery" />
  2580. var set = typeof selector === "string" ?
  2581. jQuery( selector, context ) :
  2582. jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
  2583. all = jQuery.merge( this.get(), set );
  2584. return this.pushStack( jQuery.unique(all) );
  2585. };
  2586. jQuery.prototype.addBack = function( selector ) {
  2587. return this.add( selector == null ?
  2588. this.prevObject : this.prevObject.filter(selector)
  2589. );
  2590. };
  2591. jQuery.prototype.addClass = function( value ) {
  2592. /// <summary>
  2593. /// Adds the specified class(es) to each of the set of matched elements.
  2594. /// &#10;1 - addClass(className)
  2595. /// &#10;2 - addClass(function(index, currentClass))
  2596. /// </summary>
  2597. /// <param name="value" type="String">
  2598. /// One or more class names to be added to the class attribute of each matched element.
  2599. /// </param>
  2600. /// <returns type="jQuery" />
  2601. var classes, elem, cur, clazz, j,
  2602. i = 0,
  2603. len = this.length,
  2604. proceed = typeof value === "string" && value;
  2605. if ( jQuery.isFunction( value ) ) {
  2606. return this.each(function( j ) {
  2607. jQuery( this ).addClass( value.call( this, j, this.className ) );
  2608. });
  2609. }
  2610. if ( proceed ) {
  2611. // The disjunction here is for better compressibility (see removeClass)
  2612. classes = ( value || "" ).match( core_rnotwhite ) || [];
  2613. for ( ; i < len; i++ ) {
  2614. elem = this[ i ];
  2615. cur = elem.nodeType === 1 && ( elem.className ?
  2616. ( " " + elem.className + " " ).replace( rclass, " " ) :
  2617. " "
  2618. );
  2619. if ( cur ) {
  2620. j = 0;
  2621. while ( (clazz = classes[j++]) ) {
  2622. if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
  2623. cur += clazz + " ";
  2624. }
  2625. }
  2626. elem.className = jQuery.trim( cur );
  2627. }
  2628. }
  2629. }
  2630. return this;
  2631. };
  2632. jQuery.prototype.after = function() {
  2633. /// <summary>
  2634. /// Insert content, specified by the parameter, after each element in the set of matched elements.
  2635. /// &#10;1 - after(content, content)
  2636. /// &#10;2 - after(function(index))
  2637. /// </summary>
  2638. /// <param name="" type="jQuery">
  2639. /// HTML string, DOM element, or jQuery object to insert after each element in the set of matched elements.
  2640. /// </param>
  2641. /// <param name="" type="jQuery">
  2642. /// One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements.
  2643. /// </param>
  2644. /// <returns type="jQuery" />
  2645. return this.domManip( arguments, function( elem ) {
  2646. if ( this.parentNode ) {
  2647. this.parentNode.insertBefore( elem, this.nextSibling );
  2648. }
  2649. });
  2650. };
  2651. jQuery.prototype.ajaxComplete = function( fn ){
  2652. /// <summary>
  2653. /// Register a handler to be called when Ajax requests complete. This is an Ajax Event.
  2654. /// </summary>
  2655. /// <param name="fn" type="Function">
  2656. /// The function to be invoked.
  2657. /// </param>
  2658. /// <returns type="jQuery" />
  2659. return this.on( type, fn );
  2660. };
  2661. jQuery.prototype.ajaxError = function( fn ){
  2662. /// <summary>
  2663. /// Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event.
  2664. /// </summary>
  2665. /// <param name="fn" type="Function">
  2666. /// The function to be invoked.
  2667. /// </param>
  2668. /// <returns type="jQuery" />
  2669. return this.on( type, fn );
  2670. };
  2671. jQuery.prototype.ajaxSend = function( fn ){
  2672. /// <summary>
  2673. /// Attach a function to be executed before an Ajax request is sent. This is an Ajax Event.
  2674. /// </summary>
  2675. /// <param name="fn" type="Function">
  2676. /// The function to be invoked.
  2677. /// </param>
  2678. /// <returns type="jQuery" />
  2679. return this.on( type, fn );
  2680. };
  2681. jQuery.prototype.ajaxStart = function( fn ){
  2682. /// <summary>
  2683. /// Register a handler to be called when the first Ajax request begins. This is an Ajax Event.
  2684. /// </summary>
  2685. /// <param name="fn" type="Function">
  2686. /// The function to be invoked.
  2687. /// </param>
  2688. /// <returns type="jQuery" />
  2689. return this.on( type, fn );
  2690. };
  2691. jQuery.prototype.ajaxStop = function( fn ){
  2692. /// <summary>
  2693. /// Register a handler to be called when all Ajax requests have completed. This is an Ajax Event.
  2694. /// </summary>
  2695. /// <param name="fn" type="Function">
  2696. /// The function to be invoked.
  2697. /// </param>
  2698. /// <returns type="jQuery" />
  2699. return this.on( type, fn );
  2700. };
  2701. jQuery.prototype.ajaxSuccess = function( fn ){
  2702. /// <summary>
  2703. /// Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.
  2704. /// </summary>
  2705. /// <param name="fn" type="Function">
  2706. /// The function to be invoked.
  2707. /// </param>
  2708. /// <returns type="jQuery" />
  2709. return this.on( type, fn );
  2710. };
  2711. jQuery.prototype.andSelf = function( selector ) {
  2712. /// <summary>
  2713. /// Add the previous set of elements on the stack to the current set.
  2714. /// </summary>
  2715. /// <returns type="jQuery" />
  2716. return this.add( selector == null ?
  2717. this.prevObject : this.prevObject.filter(selector)
  2718. );
  2719. };
  2720. jQuery.prototype.animate = function( prop, speed, easing, callback ) {
  2721. /// <summary>
  2722. /// Perform a custom animation of a set of CSS properties.
  2723. /// &#10;1 - animate(properties, duration, easing, complete)
  2724. /// &#10;2 - animate(properties, options)
  2725. /// </summary>
  2726. /// <param name="prop" type="Object">
  2727. /// A map of CSS properties that the animation will move toward.
  2728. /// </param>
  2729. /// <param name="speed" type="Number">
  2730. /// A string or number determining how long the animation will run.
  2731. /// </param>
  2732. /// <param name="easing" type="String">
  2733. /// A string indicating which easing function to use for the transition.
  2734. /// </param>
  2735. /// <param name="callback" type="Function">
  2736. /// A function to call once the animation is complete.
  2737. /// </param>
  2738. /// <returns type="jQuery" />
  2739. var empty = jQuery.isEmptyObject( prop ),
  2740. optall = jQuery.speed( speed, easing, callback ),
  2741. doAnimation = function() {
  2742. // Operate on a copy of prop so per-property easing won't be lost
  2743. var anim = Animation( this, jQuery.extend( {}, prop ), optall );
  2744. doAnimation.finish = function() {
  2745. anim.stop( true );
  2746. };
  2747. // Empty animations, or finishing resolves immediately
  2748. if ( empty || jQuery._data( this, "finish" ) ) {
  2749. anim.stop( true );
  2750. }
  2751. };
  2752. doAnimation.finish = doAnimation;
  2753. return empty || optall.queue === false ?
  2754. this.each( doAnimation ) :
  2755. this.queue( optall.queue, doAnimation );
  2756. };
  2757. jQuery.prototype.append = function() {
  2758. /// <summary>
  2759. /// Insert content, specified by the parameter, to the end of each element in the set of matched elements.
  2760. /// &#10;1 - append(content, content)
  2761. /// &#10;2 - append(function(index, html))
  2762. /// </summary>
  2763. /// <param name="" type="jQuery">
  2764. /// DOM element, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.
  2765. /// </param>
  2766. /// <param name="" type="jQuery">
  2767. /// One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.
  2768. /// </param>
  2769. /// <returns type="jQuery" />
  2770. return this.domManip( arguments, function( elem ) {
  2771. if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
  2772. var target = manipulationTarget( this, elem );
  2773. target.appendChild( elem );
  2774. }
  2775. });
  2776. };
  2777. jQuery.prototype.appendTo = function( selector ) {
  2778. /// <summary>
  2779. /// Insert every element in the set of matched elements to the end of the target.
  2780. /// </summary>
  2781. /// <param name="selector" type="jQuery">
  2782. /// A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter.
  2783. /// </param>
  2784. /// <returns type="jQuery" />
  2785. var elems,
  2786. i = 0,
  2787. ret = [],
  2788. insert = jQuery( selector ),
  2789. last = insert.length - 1;
  2790. for ( ; i <= last; i++ ) {
  2791. elems = i === last ? this : this.clone(true);
  2792. jQuery( insert[i] )[ original ]( elems );
  2793. // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
  2794. core_push.apply( ret, elems.get() );
  2795. }
  2796. return this.pushStack( ret );
  2797. };
  2798. jQuery.prototype.attr = function( name, value ) {
  2799. /// <summary>
  2800. /// 1: Get the value of an attribute for the first element in the set of matched elements.
  2801. /// &#10; 1.1 - attr(attributeName)
  2802. /// &#10;2: Set one or more attributes for the set of matched elements.
  2803. /// &#10; 2.1 - attr(attributeName, value)
  2804. /// &#10; 2.2 - attr(map)
  2805. /// &#10; 2.3 - attr(attributeName, function(index, attr))
  2806. /// </summary>
  2807. /// <param name="name" type="String">
  2808. /// The name of the attribute to set.
  2809. /// </param>
  2810. /// <param name="value" type="Number">
  2811. /// A value to set for the attribute.
  2812. /// </param>
  2813. /// <returns type="jQuery" />
  2814. return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
  2815. };
  2816. jQuery.prototype.before = function() {
  2817. /// <summary>
  2818. /// Insert content, specified by the parameter, before each element in the set of matched elements.
  2819. /// &#10;1 - before(content, content)
  2820. /// &#10;2 - before(function)
  2821. /// </summary>
  2822. /// <param name="" type="jQuery">
  2823. /// HTML string, DOM element, or jQuery object to insert before each element in the set of matched elements.
  2824. /// </param>
  2825. /// <param name="" type="jQuery">
  2826. /// One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements.
  2827. /// </param>
  2828. /// <returns type="jQuery" />
  2829. return this.domManip( arguments, function( elem ) {
  2830. if ( this.parentNode ) {
  2831. this.parentNode.insertBefore( elem, this );
  2832. }
  2833. });
  2834. };
  2835. jQuery.prototype.bind = function( types, data, fn ) {
  2836. /// <summary>
  2837. /// Attach a handler to an event for the elements.
  2838. /// &#10;1 - bind(eventType, eventData, handler(eventObject))
  2839. /// &#10;2 - bind(eventType, eventData, preventBubble)
  2840. /// &#10;3 - bind(events)
  2841. /// </summary>
  2842. /// <param name="types" type="String">
  2843. /// A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
  2844. /// </param>
  2845. /// <param name="data" type="Object">
  2846. /// A map of data that will be passed to the event handler.
  2847. /// </param>
  2848. /// <param name="fn" type="Function">
  2849. /// A function to execute each time the event is triggered.
  2850. /// </param>
  2851. /// <returns type="jQuery" />
  2852. return this.on( types, null, data, fn );
  2853. };
  2854. jQuery.prototype.blur = function( data, fn ) {
  2855. /// <summary>
  2856. /// Bind an event handler to the "blur" JavaScript event, or trigger that event on an element.
  2857. /// &#10;1 - blur(handler(eventObject))
  2858. /// &#10;2 - blur(eventData, handler(eventObject))
  2859. /// &#10;3 - blur()
  2860. /// </summary>
  2861. /// <param name="data" type="Object">
  2862. /// A map of data that will be passed to the event handler.
  2863. /// </param>
  2864. /// <param name="fn" type="Function">
  2865. /// A function to execute each time the event is triggered.
  2866. /// </param>
  2867. /// <returns type="jQuery" />
  2868. return arguments.length > 0 ?
  2869. this.on( name, null, data, fn ) :
  2870. this.trigger( name );
  2871. };
  2872. jQuery.prototype.change = function( data, fn ) {
  2873. /// <summary>
  2874. /// Bind an event handler to the "change" JavaScript event, or trigger that event on an element.
  2875. /// &#10;1 - change(handler(eventObject))
  2876. /// &#10;2 - change(eventData, handler(eventObject))
  2877. /// &#10;3 - change()
  2878. /// </summary>
  2879. /// <param name="data" type="Object">
  2880. /// A map of data that will be passed to the event handler.
  2881. /// </param>
  2882. /// <param name="fn" type="Function">
  2883. /// A function to execute each time the event is triggered.
  2884. /// </param>
  2885. /// <returns type="jQuery" />
  2886. return arguments.length > 0 ?
  2887. this.on( name, null, data, fn ) :
  2888. this.trigger( name );
  2889. };
  2890. jQuery.prototype.children = function( until, selector ) {
  2891. /// <summary>
  2892. /// Get the children of each element in the set of matched elements, optionally filtered by a selector.
  2893. /// </summary>
  2894. /// <param name="until" type="String">
  2895. /// A string containing a selector expression to match elements against.
  2896. /// </param>
  2897. /// <returns type="jQuery" />
  2898. var ret = jQuery.map( this, fn, until );
  2899. if ( name.slice( -5 ) !== "Until" ) {
  2900. selector = until;
  2901. }
  2902. if ( selector && typeof selector === "string" ) {
  2903. ret = jQuery.filter( selector, ret );
  2904. }
  2905. if ( this.length > 1 ) {
  2906. // Remove duplicates
  2907. if ( !guaranteedUnique[ name ] ) {
  2908. ret = jQuery.unique( ret );
  2909. }
  2910. // Reverse order for parents* and prev-derivatives
  2911. if ( rparentsprev.test( name ) ) {
  2912. ret = ret.reverse();
  2913. }
  2914. }
  2915. return this.pushStack( ret );
  2916. };
  2917. jQuery.prototype.clearQueue = function( type ) {
  2918. /// <summary>
  2919. /// Remove from the queue all items that have not yet been run.
  2920. /// </summary>
  2921. /// <param name="type" type="String">
  2922. /// A string containing the name of the queue. Defaults to fx, the standard effects queue.
  2923. /// </param>
  2924. /// <returns type="jQuery" />
  2925. return this.queue( type || "fx", [] );
  2926. };
  2927. jQuery.prototype.click = function( data, fn ) {
  2928. /// <summary>
  2929. /// Bind an event handler to the "click" JavaScript event, or trigger that event on an element.
  2930. /// &#10;1 - click(handler(eventObject))
  2931. /// &#10;2 - click(eventData, handler(eventObject))
  2932. /// &#10;3 - click()
  2933. /// </summary>
  2934. /// <param name="data" type="Object">
  2935. /// A map of data that will be passed to the event handler.
  2936. /// </param>
  2937. /// <param name="fn" type="Function">
  2938. /// A function to execute each time the event is triggered.
  2939. /// </param>
  2940. /// <returns type="jQuery" />
  2941. return arguments.length > 0 ?
  2942. this.on( name, null, data, fn ) :
  2943. this.trigger( name );
  2944. };
  2945. jQuery.prototype.clone = function( dataAndEvents, deepDataAndEvents ) {
  2946. /// <summary>
  2947. /// Create a deep copy of the set of matched elements.
  2948. /// &#10;1 - clone(withDataAndEvents)
  2949. /// &#10;2 - clone(withDataAndEvents, deepWithDataAndEvents)
  2950. /// </summary>
  2951. /// <param name="dataAndEvents" type="Boolean">
  2952. /// A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false. *In jQuery 1.5.0 the default value was incorrectly true; it was changed back to false in 1.5.1 and up.
  2953. /// </param>
  2954. /// <param name="deepDataAndEvents" type="Boolean">
  2955. /// A Boolean indicating whether event handlers and data for all children of the cloned element should be copied. By default its value matches the first argument's value (which defaults to false).
  2956. /// </param>
  2957. /// <returns type="jQuery" />
  2958. dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
  2959. deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
  2960. return this.map( function () {
  2961. return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
  2962. });
  2963. };
  2964. jQuery.prototype.closest = function( selectors, context ) {
  2965. /// <summary>
  2966. /// 1: Get the first element that matches the selector, beginning at the current element and progressing up through the DOM tree.
  2967. /// &#10; 1.1 - closest(selector)
  2968. /// &#10; 1.2 - closest(selector, context)
  2969. /// &#10; 1.3 - closest(jQuery object)
  2970. /// &#10; 1.4 - closest(element)
  2971. /// &#10;2: Gets an array of all the elements and selectors matched against the current element up through the DOM tree.
  2972. /// &#10; 2.1 - closest(selectors, context)
  2973. /// </summary>
  2974. /// <param name="selectors" type="String">
  2975. /// A string containing a selector expression to match elements against.
  2976. /// </param>
  2977. /// <param name="context" domElement="true">
  2978. /// A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead.
  2979. /// </param>
  2980. /// <returns type="jQuery" />
  2981. var cur,
  2982. i = 0,
  2983. l = this.length,
  2984. ret = [],
  2985. pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
  2986. jQuery( selectors, context || this.context ) :
  2987. 0;
  2988. for ( ; i < l; i++ ) {
  2989. for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
  2990. // Always skip document fragments
  2991. if ( cur.nodeType < 11 && (pos ?
  2992. pos.index(cur) > -1 :
  2993. // Don't pass non-elements to Sizzle
  2994. cur.nodeType === 1 &&
  2995. jQuery.find.matchesSelector(cur, selectors)) ) {
  2996. cur = ret.push( cur );
  2997. break;
  2998. }
  2999. }
  3000. }
  3001. return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );
  3002. };
  3003. jQuery.prototype.constructor = function( selector, context ) {
  3004. // The jQuery object is actually just the init constructor 'enhanced'
  3005. return new jQuery.fn.init( selector, context, rootjQuery );
  3006. };
  3007. jQuery.prototype.contents = function( until, selector ) {
  3008. /// <summary>
  3009. /// Get the children of each element in the set of matched elements, including text and comment nodes.
  3010. /// </summary>
  3011. /// <returns type="jQuery" />
  3012. var ret = jQuery.map( this, fn, until );
  3013. if ( name.slice( -5 ) !== "Until" ) {
  3014. selector = until;
  3015. }
  3016. if ( selector && typeof selector === "string" ) {
  3017. ret = jQuery.filter( selector, ret );
  3018. }
  3019. if ( this.length > 1 ) {
  3020. // Remove duplicates
  3021. if ( !guaranteedUnique[ name ] ) {
  3022. ret = jQuery.unique( ret );
  3023. }
  3024. // Reverse order for parents* and prev-derivatives
  3025. if ( rparentsprev.test( name ) ) {
  3026. ret = ret.reverse();
  3027. }
  3028. }
  3029. return this.pushStack( ret );
  3030. };
  3031. jQuery.prototype.contextmenu = function( data, fn ) {
  3032. return arguments.length > 0 ?
  3033. this.on( name, null, data, fn ) :
  3034. this.trigger( name );
  3035. };
  3036. jQuery.prototype.css = function( name, value ) {
  3037. /// <summary>
  3038. /// 1: Get the value of a style property for the first element in the set of matched elements.
  3039. /// &#10; 1.1 - css(propertyName)
  3040. /// &#10;2: Set one or more CSS properties for the set of matched elements.
  3041. /// &#10; 2.1 - css(propertyName, value)
  3042. /// &#10; 2.2 - css(propertyName, function(index, value))
  3043. /// &#10; 2.3 - css(map)
  3044. /// </summary>
  3045. /// <param name="name" type="String">
  3046. /// A CSS property name.
  3047. /// </param>
  3048. /// <param name="value" type="Number">
  3049. /// A value to set for the property.
  3050. /// </param>
  3051. /// <returns type="jQuery" />
  3052. return jQuery.access( this, function( elem, name, value ) {
  3053. var len, styles,
  3054. map = {},
  3055. i = 0;
  3056. if ( jQuery.isArray( name ) ) {
  3057. styles = getStyles( elem );
  3058. len = name.length;
  3059. for ( ; i < len; i++ ) {
  3060. map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
  3061. }
  3062. return map;
  3063. }
  3064. return value !== undefined ?
  3065. jQuery.style( elem, name, value ) :
  3066. jQuery.css( elem, name );
  3067. }, name, value, arguments.length > 1 );
  3068. };
  3069. jQuery.prototype.data = function( key, value ) {
  3070. /// <summary>
  3071. /// 1: Store arbitrary data associated with the matched elements.
  3072. /// &#10; 1.1 - data(key, value)
  3073. /// &#10; 1.2 - data(obj)
  3074. /// &#10;2: Returns value at named data store for the first element in the jQuery collection, as set by data(name, value).
  3075. /// &#10; 2.1 - data(key)
  3076. /// &#10; 2.2 - data()
  3077. /// </summary>
  3078. /// <param name="key" type="String">
  3079. /// A string naming the piece of data to set.
  3080. /// </param>
  3081. /// <param name="value" type="Object">
  3082. /// The new data value; it can be any Javascript type including Array or Object.
  3083. /// </param>
  3084. /// <returns type="jQuery" />
  3085. var attrs, name,
  3086. data = null,
  3087. i = 0,
  3088. elem = this[0];
  3089. // Special expections of .data basically thwart jQuery.access,
  3090. // so implement the relevant behavior ourselves
  3091. // Gets all values
  3092. if ( key === undefined ) {
  3093. if ( this.length ) {
  3094. data = jQuery.data( elem );
  3095. if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
  3096. attrs = elem.attributes;
  3097. for ( ; i < attrs.length; i++ ) {
  3098. name = attrs[i].name;
  3099. if ( name.indexOf("data-") === 0 ) {
  3100. name = jQuery.camelCase( name.slice(5) );
  3101. dataAttr( elem, name, data[ name ] );
  3102. }
  3103. }
  3104. jQuery._data( elem, "parsedAttrs", true );
  3105. }
  3106. }
  3107. return data;
  3108. }
  3109. // Sets multiple values
  3110. if ( typeof key === "object" ) {
  3111. return this.each(function() {
  3112. jQuery.data( this, key );
  3113. });
  3114. }
  3115. return arguments.length > 1 ?
  3116. // Sets one value
  3117. this.each(function() {
  3118. jQuery.data( this, key, value );
  3119. }) :
  3120. // Gets one value
  3121. // Try to fetch any internally stored data first
  3122. elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
  3123. };
  3124. jQuery.prototype.dblclick = function( data, fn ) {
  3125. /// <summary>
  3126. /// Bind an event handler to the "dblclick" JavaScript event, or trigger that event on an element.
  3127. /// &#10;1 - dblclick(handler(eventObject))
  3128. /// &#10;2 - dblclick(eventData, handler(eventObject))
  3129. /// &#10;3 - dblclick()
  3130. /// </summary>
  3131. /// <param name="data" type="Object">
  3132. /// A map of data that will be passed to the event handler.
  3133. /// </param>
  3134. /// <param name="fn" type="Function">
  3135. /// A function to execute each time the event is triggered.
  3136. /// </param>
  3137. /// <returns type="jQuery" />
  3138. return arguments.length > 0 ?
  3139. this.on( name, null, data, fn ) :
  3140. this.trigger( name );
  3141. };
  3142. jQuery.prototype.delay = function( time, type ) {
  3143. /// <summary>
  3144. /// Set a timer to delay execution of subsequent items in the queue.
  3145. /// </summary>
  3146. /// <param name="time" type="Number">
  3147. /// An integer indicating the number of milliseconds to delay execution of the next item in the queue.
  3148. /// </param>
  3149. /// <param name="type" type="String">
  3150. /// A string containing the name of the queue. Defaults to fx, the standard effects queue.
  3151. /// </param>
  3152. /// <returns type="jQuery" />
  3153. time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
  3154. type = type || "fx";
  3155. return this.queue( type, function( next, hooks ) {
  3156. var timeout = setTimeout( next, time );
  3157. hooks.stop = function() {
  3158. clearTimeout( timeout );
  3159. };
  3160. });
  3161. };
  3162. jQuery.prototype.delegate = function( selector, types, data, fn ) {
  3163. /// <summary>
  3164. /// Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements.
  3165. /// &#10;1 - delegate(selector, eventType, handler(eventObject))
  3166. /// &#10;2 - delegate(selector, eventType, eventData, handler(eventObject))
  3167. /// &#10;3 - delegate(selector, events)
  3168. /// </summary>
  3169. /// <param name="selector" type="String">
  3170. /// A selector to filter the elements that trigger the event.
  3171. /// </param>
  3172. /// <param name="types" type="String">
  3173. /// A string containing one or more space-separated JavaScript event types, such as "click" or "keydown," or custom event names.
  3174. /// </param>
  3175. /// <param name="data" type="Object">
  3176. /// A map of data that will be passed to the event handler.
  3177. /// </param>
  3178. /// <param name="fn" type="Function">
  3179. /// A function to execute at the time the event is triggered.
  3180. /// </param>
  3181. /// <returns type="jQuery" />
  3182. return this.on( types, selector, data, fn );
  3183. };
  3184. jQuery.prototype.dequeue = function( type ) {
  3185. /// <summary>
  3186. /// Execute the next function on the queue for the matched elements.
  3187. /// </summary>
  3188. /// <param name="type" type="String">
  3189. /// A string containing the name of the queue. Defaults to fx, the standard effects queue.
  3190. /// </param>
  3191. /// <returns type="jQuery" />
  3192. return this.each(function() {
  3193. jQuery.dequeue( this, type );
  3194. });
  3195. };
  3196. jQuery.prototype.detach = function( selector ) {
  3197. /// <summary>
  3198. /// Remove the set of matched elements from the DOM.
  3199. /// </summary>
  3200. /// <param name="selector" type="String">
  3201. /// A selector expression that filters the set of matched elements to be removed.
  3202. /// </param>
  3203. /// <returns type="jQuery" />
  3204. return this.remove( selector, true );
  3205. };
  3206. jQuery.prototype.domManip = function( args, callback, allowIntersection ) {
  3207. // Flatten any nested arrays
  3208. args = core_concat.apply( [], args );
  3209. var first, node, hasScripts,
  3210. scripts, doc, fragment,
  3211. i = 0,
  3212. l = this.length,
  3213. set = this,
  3214. iNoClone = l - 1,
  3215. value = args[0],
  3216. isFunction = jQuery.isFunction( value );
  3217. // We can't cloneNode fragments that contain checked, in WebKit
  3218. if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
  3219. return this.each(function( index ) {
  3220. var self = set.eq( index );
  3221. if ( isFunction ) {
  3222. args[0] = value.call( this, index, self.html() );
  3223. }
  3224. self.domManip( args, callback, allowIntersection );
  3225. });
  3226. }
  3227. if ( l ) {
  3228. fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this );
  3229. first = fragment.firstChild;
  3230. if ( fragment.childNodes.length === 1 ) {
  3231. fragment = first;
  3232. }
  3233. if ( first ) {
  3234. scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
  3235. hasScripts = scripts.length;
  3236. // Use the original fragment for the last item instead of the first because it can end up
  3237. // being emptied incorrectly in certain situations (#8070).
  3238. for ( ; i < l; i++ ) {
  3239. node = fragment;
  3240. if ( i !== iNoClone ) {
  3241. node = jQuery.clone( node, true, true );
  3242. // Keep references to cloned scripts for later restoration
  3243. if ( hasScripts ) {
  3244. jQuery.merge( scripts, getAll( node, "script" ) );
  3245. }
  3246. }
  3247. callback.call( this[i], node, i );
  3248. }
  3249. if ( hasScripts ) {
  3250. doc = scripts[ scripts.length - 1 ].ownerDocument;
  3251. // Reenable scripts
  3252. jQuery.map( scripts, restoreScript );
  3253. // Evaluate executable scripts on first document insertion
  3254. for ( i = 0; i < hasScripts; i++ ) {
  3255. node = scripts[ i ];
  3256. if ( rscriptType.test( node.type || "" ) &&
  3257. !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
  3258. if ( node.src ) {
  3259. // Hope ajax is available...
  3260. jQuery._evalUrl( node.src );
  3261. } else {
  3262. jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
  3263. }
  3264. }
  3265. }
  3266. }
  3267. // Fix #11809: Avoid leaking memory
  3268. fragment = first = null;
  3269. }
  3270. }
  3271. return this;
  3272. };
  3273. jQuery.prototype.each = function( callback, args ) {
  3274. /// <summary>
  3275. /// Iterate over a jQuery object, executing a function for each matched element.
  3276. /// </summary>
  3277. /// <param name="callback" type="Function">
  3278. /// A function to execute for each matched element.
  3279. /// </param>
  3280. /// <returns type="jQuery" />
  3281. return jQuery.each( this, callback, args );
  3282. };
  3283. jQuery.prototype.empty = function() {
  3284. /// <summary>
  3285. /// Remove all child nodes of the set of matched elements from the DOM.
  3286. /// </summary>
  3287. /// <returns type="jQuery" />
  3288. var elem,
  3289. i = 0;
  3290. for ( ; (elem = this[i]) != null; i++ ) {
  3291. // Remove element nodes and prevent memory leaks
  3292. if ( elem.nodeType === 1 ) {
  3293. jQuery.cleanData( getAll( elem, false ) );
  3294. }
  3295. // Remove any remaining nodes
  3296. while ( elem.firstChild ) {
  3297. elem.removeChild( elem.firstChild );
  3298. }
  3299. // If this is a select, ensure that it displays empty (#12336)
  3300. // Support: IE<9
  3301. if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
  3302. elem.options.length = 0;
  3303. }
  3304. }
  3305. return this;
  3306. };
  3307. jQuery.prototype.end = function() {
  3308. /// <summary>
  3309. /// End the most recent filtering operation in the current chain and return the set of matched elements to its previous state.
  3310. /// </summary>
  3311. /// <returns type="jQuery" />
  3312. return this.prevObject || this.constructor(null);
  3313. };
  3314. jQuery.prototype.eq = function( i ) {
  3315. /// <summary>
  3316. /// Reduce the set of matched elements to the one at the specified index.
  3317. /// &#10;1 - eq(index)
  3318. /// &#10;2 - eq(-index)
  3319. /// </summary>
  3320. /// <param name="i" type="Number">
  3321. /// An integer indicating the 0-based position of the element.
  3322. /// </param>
  3323. /// <returns type="jQuery" />
  3324. var len = this.length,
  3325. j = +i + ( i < 0 ? len : 0 );
  3326. return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
  3327. };
  3328. jQuery.prototype.error = function( data, fn ) {
  3329. /// <summary>
  3330. /// Bind an event handler to the "error" JavaScript event.
  3331. /// &#10;1 - error(handler(eventObject))
  3332. /// &#10;2 - error(eventData, handler(eventObject))
  3333. /// </summary>
  3334. /// <param name="data" type="Object">
  3335. /// A map of data that will be passed to the event handler.
  3336. /// </param>
  3337. /// <param name="fn" type="Function">
  3338. /// A function to execute each time the event is triggered.
  3339. /// </param>
  3340. /// <returns type="jQuery" />
  3341. return arguments.length > 0 ?
  3342. this.on( name, null, data, fn ) :
  3343. this.trigger( name );
  3344. };
  3345. jQuery.prototype.extend = function() {
  3346. var src, copyIsArray, copy, name, options, clone,
  3347. target = arguments[0] || {},
  3348. i = 1,
  3349. length = arguments.length,
  3350. deep = false;
  3351. // Handle a deep copy situation
  3352. if ( typeof target === "boolean" ) {
  3353. deep = target;
  3354. target = arguments[1] || {};
  3355. // skip the boolean and the target
  3356. i = 2;
  3357. }
  3358. // Handle case when target is a string or something (possible in deep copy)
  3359. if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
  3360. target = {};
  3361. }
  3362. // extend jQuery itself if only one argument is passed
  3363. if ( length === i ) {
  3364. target = this;
  3365. --i;
  3366. }
  3367. for ( ; i < length; i++ ) {
  3368. // Only deal with non-null/undefined values
  3369. if ( (options = arguments[ i ]) != null ) {
  3370. // Extend the base object
  3371. for ( name in options ) {
  3372. src = target[ name ];
  3373. copy = options[ name ];
  3374. // Prevent never-ending loop
  3375. if ( target === copy ) {
  3376. continue;
  3377. }
  3378. // Recurse if we're merging plain objects or arrays
  3379. if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
  3380. if ( copyIsArray ) {
  3381. copyIsArray = false;
  3382. clone = src && jQuery.isArray(src) ? src : [];
  3383. } else {
  3384. clone = src && jQuery.isPlainObject(src) ? src : {};
  3385. }
  3386. // Never move original objects, clone them
  3387. target[ name ] = jQuery.extend( deep, clone, copy );
  3388. // Don't bring in undefined values
  3389. } else if ( copy !== undefined ) {
  3390. target[ name ] = copy;
  3391. }
  3392. }
  3393. }
  3394. }
  3395. // Return the modified object
  3396. return target;
  3397. };
  3398. jQuery.prototype.fadeIn = function( speed, easing, callback ) {
  3399. /// <summary>
  3400. /// Display the matched elements by fading them to opaque.
  3401. /// &#10;1 - fadeIn(duration, callback)
  3402. /// &#10;2 - fadeIn(duration, easing, callback)
  3403. /// </summary>
  3404. /// <param name="speed" type="Number">
  3405. /// A string or number determining how long the animation will run.
  3406. /// </param>
  3407. /// <param name="easing" type="String">
  3408. /// A string indicating which easing function to use for the transition.
  3409. /// </param>
  3410. /// <param name="callback" type="Function">
  3411. /// A function to call once the animation is complete.
  3412. /// </param>
  3413. /// <returns type="jQuery" />
  3414. return this.animate( props, speed, easing, callback );
  3415. };
  3416. jQuery.prototype.fadeOut = function( speed, easing, callback ) {
  3417. /// <summary>
  3418. /// Hide the matched elements by fading them to transparent.
  3419. /// &#10;1 - fadeOut(duration, callback)
  3420. /// &#10;2 - fadeOut(duration, easing, callback)
  3421. /// </summary>
  3422. /// <param name="speed" type="Number">
  3423. /// A string or number determining how long the animation will run.
  3424. /// </param>
  3425. /// <param name="easing" type="String">
  3426. /// A string indicating which easing function to use for the transition.
  3427. /// </param>
  3428. /// <param name="callback" type="Function">
  3429. /// A function to call once the animation is complete.
  3430. /// </param>
  3431. /// <returns type="jQuery" />
  3432. return this.animate( props, speed, easing, callback );
  3433. };
  3434. jQuery.prototype.fadeTo = function( speed, to, easing, callback ) {
  3435. /// <summary>
  3436. /// Adjust the opacity of the matched elements.
  3437. /// &#10;1 - fadeTo(duration, opacity, callback)
  3438. /// &#10;2 - fadeTo(duration, opacity, easing, callback)
  3439. /// </summary>
  3440. /// <param name="speed" type="Number">
  3441. /// A string or number determining how long the animation will run.
  3442. /// </param>
  3443. /// <param name="to" type="Number">
  3444. /// A number between 0 and 1 denoting the target opacity.
  3445. /// </param>
  3446. /// <param name="easing" type="String">
  3447. /// A string indicating which easing function to use for the transition.
  3448. /// </param>
  3449. /// <param name="callback" type="Function">
  3450. /// A function to call once the animation is complete.
  3451. /// </param>
  3452. /// <returns type="jQuery" />
  3453. // show any hidden elements after setting opacity to 0
  3454. return this.filter( isHidden ).css( "opacity", 0 ).show()
  3455. // animate to the value specified
  3456. .end().animate({ opacity: to }, speed, easing, callback );
  3457. };
  3458. jQuery.prototype.fadeToggle = function( speed, easing, callback ) {
  3459. /// <summary>
  3460. /// Display or hide the matched elements by animating their opacity.
  3461. /// </summary>
  3462. /// <param name="speed" type="Number">
  3463. /// A string or number determining how long the animation will run.
  3464. /// </param>
  3465. /// <param name="easing" type="String">
  3466. /// A string indicating which easing function to use for the transition.
  3467. /// </param>
  3468. /// <param name="callback" type="Function">
  3469. /// A function to call once the animation is complete.
  3470. /// </param>
  3471. /// <returns type="jQuery" />
  3472. return this.animate( props, speed, easing, callback );
  3473. };
  3474. jQuery.prototype.filter = function( selector ) {
  3475. /// <summary>
  3476. /// Reduce the set of matched elements to those that match the selector or pass the function's test.
  3477. /// &#10;1 - filter(selector)
  3478. /// &#10;2 - filter(function(index))
  3479. /// &#10;3 - filter(element)
  3480. /// &#10;4 - filter(jQuery object)
  3481. /// </summary>
  3482. /// <param name="selector" type="String">
  3483. /// A string containing a selector expression to match the current set of elements against.
  3484. /// </param>
  3485. /// <returns type="jQuery" />
  3486. return this.pushStack( winnow(this, selector || [], false) );
  3487. };
  3488. jQuery.prototype.find = function( selector ) {
  3489. /// <summary>
  3490. /// Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
  3491. /// &#10;1 - find(selector)
  3492. /// &#10;2 - find(jQuery object)
  3493. /// &#10;3 - find(element)
  3494. /// </summary>
  3495. /// <param name="selector" type="String">
  3496. /// A string containing a selector expression to match elements against.
  3497. /// </param>
  3498. /// <returns type="jQuery" />
  3499. var i,
  3500. ret = [],
  3501. self = this,
  3502. len = self.length;
  3503. if ( typeof selector !== "string" ) {
  3504. return this.pushStack( jQuery( selector ).filter(function() {
  3505. for ( i = 0; i < len; i++ ) {
  3506. if ( jQuery.contains( self[ i ], this ) ) {
  3507. return true;
  3508. }
  3509. }
  3510. }) );
  3511. }
  3512. for ( i = 0; i < len; i++ ) {
  3513. jQuery.find( selector, self[ i ], ret );
  3514. }
  3515. // Needed because $( selector, context ) becomes $( context ).find( selector )
  3516. ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
  3517. ret.selector = this.selector ? this.selector + " " + selector : selector;
  3518. return ret;
  3519. };
  3520. jQuery.prototype.finish = function( type ) {
  3521. if ( type !== false ) {
  3522. type = type || "fx";
  3523. }
  3524. return this.each(function() {
  3525. var index,
  3526. data = jQuery._data( this ),
  3527. queue = data[ type + "queue" ],
  3528. hooks = data[ type + "queueHooks" ],
  3529. timers = jQuery.timers,
  3530. length = queue ? queue.length : 0;
  3531. // enable finishing flag on private data
  3532. data.finish = true;
  3533. // empty the queue first
  3534. jQuery.queue( this, type, [] );
  3535. if ( hooks && hooks.cur && hooks.cur.finish ) {
  3536. hooks.cur.finish.call( this );
  3537. }
  3538. // look for any active animations, and finish them
  3539. for ( index = timers.length; index--; ) {
  3540. if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
  3541. timers[ index ].anim.stop( true );
  3542. timers.splice( index, 1 );
  3543. }
  3544. }
  3545. // look for any animations in the old queue and finish them
  3546. for ( index = 0; index < length; index++ ) {
  3547. if ( queue[ index ] && queue[ index ].finish ) {
  3548. queue[ index ].finish.call( this );
  3549. }
  3550. }
  3551. // turn off finishing flag
  3552. delete data.finish;
  3553. });
  3554. };
  3555. jQuery.prototype.first = function() {
  3556. /// <summary>
  3557. /// Reduce the set of matched elements to the first in the set.
  3558. /// </summary>
  3559. /// <returns type="jQuery" />
  3560. return this.eq( 0 );
  3561. };
  3562. jQuery.prototype.focus = function( data, fn ) {
  3563. /// <summary>
  3564. /// Bind an event handler to the "focus" JavaScript event, or trigger that event on an element.
  3565. /// &#10;1 - focus(handler(eventObject))
  3566. /// &#10;2 - focus(eventData, handler(eventObject))
  3567. /// &#10;3 - focus()
  3568. /// </summary>
  3569. /// <param name="data" type="Object">
  3570. /// A map of data that will be passed to the event handler.
  3571. /// </param>
  3572. /// <param name="fn" type="Function">
  3573. /// A function to execute each time the event is triggered.
  3574. /// </param>
  3575. /// <returns type="jQuery" />
  3576. return arguments.length > 0 ?
  3577. this.on( name, null, data, fn ) :
  3578. this.trigger( name );
  3579. };
  3580. jQuery.prototype.focusin = function( data, fn ) {
  3581. /// <summary>
  3582. /// Bind an event handler to the "focusin" event.
  3583. /// &#10;1 - focusin(handler(eventObject))
  3584. /// &#10;2 - focusin(eventData, handler(eventObject))
  3585. /// </summary>
  3586. /// <param name="data" type="Object">
  3587. /// A map of data that will be passed to the event handler.
  3588. /// </param>
  3589. /// <param name="fn" type="Function">
  3590. /// A function to execute each time the event is triggered.
  3591. /// </param>
  3592. /// <returns type="jQuery" />
  3593. return arguments.length > 0 ?
  3594. this.on( name, null, data, fn ) :
  3595. this.trigger( name );
  3596. };
  3597. jQuery.prototype.focusout = function( data, fn ) {
  3598. /// <summary>
  3599. /// Bind an event handler to the "focusout" JavaScript event.
  3600. /// &#10;1 - focusout(handler(eventObject))
  3601. /// &#10;2 - focusout(eventData, handler(eventObject))
  3602. /// </summary>
  3603. /// <param name="data" type="Object">
  3604. /// A map of data that will be passed to the event handler.
  3605. /// </param>
  3606. /// <param name="fn" type="Function">
  3607. /// A function to execute each time the event is triggered.
  3608. /// </param>
  3609. /// <returns type="jQuery" />
  3610. return arguments.length > 0 ?
  3611. this.on( name, null, data, fn ) :
  3612. this.trigger( name );
  3613. };
  3614. jQuery.prototype.get = function( num ) {
  3615. /// <summary>
  3616. /// Retrieve the DOM elements matched by the jQuery object.
  3617. /// </summary>
  3618. /// <param name="num" type="Number">
  3619. /// A zero-based integer indicating which element to retrieve.
  3620. /// </param>
  3621. /// <returns type="Array" />
  3622. return num == null ?
  3623. // Return a 'clean' array
  3624. this.toArray() :
  3625. // Return just the object
  3626. ( num < 0 ? this[ this.length + num ] : this[ num ] );
  3627. };
  3628. jQuery.prototype.has = function( target ) {
  3629. /// <summary>
  3630. /// Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
  3631. /// &#10;1 - has(selector)
  3632. /// &#10;2 - has(contained)
  3633. /// </summary>
  3634. /// <param name="target" type="String">
  3635. /// A string containing a selector expression to match elements against.
  3636. /// </param>
  3637. /// <returns type="jQuery" />
  3638. var i,
  3639. targets = jQuery( target, this ),
  3640. len = targets.length;
  3641. return this.filter(function() {
  3642. for ( i = 0; i < len; i++ ) {
  3643. if ( jQuery.contains( this, targets[i] ) ) {
  3644. return true;
  3645. }
  3646. }
  3647. });
  3648. };
  3649. jQuery.prototype.hasClass = function( selector ) {
  3650. /// <summary>
  3651. /// Determine whether any of the matched elements are assigned the given class.
  3652. /// </summary>
  3653. /// <param name="selector" type="String">
  3654. /// The class name to search for.
  3655. /// </param>
  3656. /// <returns type="Boolean" />
  3657. var className = " " + selector + " ",
  3658. i = 0,
  3659. l = this.length;
  3660. for ( ; i < l; i++ ) {
  3661. if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
  3662. return true;
  3663. }
  3664. }
  3665. return false;
  3666. };
  3667. jQuery.prototype.height = function( margin, value ) {
  3668. /// <summary>
  3669. /// 1: Get the current computed height for the first element in the set of matched elements.
  3670. /// &#10; 1.1 - height()
  3671. /// &#10;2: Set the CSS height of every matched element.
  3672. /// &#10; 2.1 - height(value)
  3673. /// &#10; 2.2 - height(function(index, height))
  3674. /// </summary>
  3675. /// <param name="margin" type="Number">
  3676. /// An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string).
  3677. /// </param>
  3678. /// <returns type="jQuery" />
  3679. var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
  3680. extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
  3681. return jQuery.access( this, function( elem, type, value ) {
  3682. var doc;
  3683. if ( jQuery.isWindow( elem ) ) {
  3684. // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
  3685. // isn't a whole lot we can do. See pull request at this URL for discussion:
  3686. // https://github.com/jquery/jquery/pull/764
  3687. return elem.document.documentElement[ "client" + name ];
  3688. }
  3689. // Get document width or height
  3690. if ( elem.nodeType === 9 ) {
  3691. doc = elem.documentElement;
  3692. // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
  3693. // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
  3694. return Math.max(
  3695. elem.body[ "scroll" + name ], doc[ "scroll" + name ],
  3696. elem.body[ "offset" + name ], doc[ "offset" + name ],
  3697. doc[ "client" + name ]
  3698. );
  3699. }
  3700. return value === undefined ?
  3701. // Get width or height on the element, requesting but not forcing parseFloat
  3702. jQuery.css( elem, type, extra ) :
  3703. // Set width or height on the element
  3704. jQuery.style( elem, type, value, extra );
  3705. }, type, chainable ? margin : undefined, chainable, null );
  3706. };
  3707. jQuery.prototype.hide = function( speed, easing, callback ) {
  3708. /// <summary>
  3709. /// Hide the matched elements.
  3710. /// &#10;1 - hide()
  3711. /// &#10;2 - hide(duration, callback)
  3712. /// &#10;3 - hide(duration, easing, callback)
  3713. /// </summary>
  3714. /// <param name="speed" type="Number">
  3715. /// A string or number determining how long the animation will run.
  3716. /// </param>
  3717. /// <param name="easing" type="String">
  3718. /// A string indicating which easing function to use for the transition.
  3719. /// </param>
  3720. /// <param name="callback" type="Function">
  3721. /// A function to call once the animation is complete.
  3722. /// </param>
  3723. /// <returns type="jQuery" />
  3724. return speed == null || typeof speed === "boolean" ?
  3725. cssFn.apply( this, arguments ) :
  3726. this.animate( genFx( name, true ), speed, easing, callback );
  3727. };
  3728. jQuery.prototype.hover = function( fnOver, fnOut ) {
  3729. /// <summary>
  3730. /// 1: Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.
  3731. /// &#10; 1.1 - hover(handlerIn(eventObject), handlerOut(eventObject))
  3732. /// &#10;2: Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements.
  3733. /// &#10; 2.1 - hover(handlerInOut(eventObject))
  3734. /// </summary>
  3735. /// <param name="fnOver" type="Function">
  3736. /// A function to execute when the mouse pointer enters the element.
  3737. /// </param>
  3738. /// <param name="fnOut" type="Function">
  3739. /// A function to execute when the mouse pointer leaves the element.
  3740. /// </param>
  3741. /// <returns type="jQuery" />
  3742. return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
  3743. };
  3744. jQuery.prototype.html = function( value ) {
  3745. /// <summary>
  3746. /// 1: Get the HTML contents of the first element in the set of matched elements.
  3747. /// &#10; 1.1 - html()
  3748. /// &#10;2: Set the HTML contents of each element in the set of matched elements.
  3749. /// &#10; 2.1 - html(htmlString)
  3750. /// &#10; 2.2 - html(function(index, oldhtml))
  3751. /// </summary>
  3752. /// <param name="value" type="String">
  3753. /// A string of HTML to set as the content of each matched element.
  3754. /// </param>
  3755. /// <returns type="jQuery" />
  3756. return jQuery.access( this, function( value ) {
  3757. var elem = this[0] || {},
  3758. i = 0,
  3759. l = this.length;
  3760. if ( value === undefined ) {
  3761. return elem.nodeType === 1 ?
  3762. elem.innerHTML.replace( rinlinejQuery, "" ) :
  3763. undefined;
  3764. }
  3765. // See if we can take a shortcut and just use innerHTML
  3766. if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
  3767. ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&
  3768. ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
  3769. !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
  3770. value = value.replace( rxhtmlTag, "<$1></$2>" );
  3771. try {
  3772. for (; i < l; i++ ) {
  3773. // Remove element nodes and prevent memory leaks
  3774. elem = this[i] || {};
  3775. if ( elem.nodeType === 1 ) {
  3776. jQuery.cleanData( getAll( elem, false ) );
  3777. elem.innerHTML = value;
  3778. }
  3779. }
  3780. elem = 0;
  3781. // If using innerHTML throws an exception, use the fallback method
  3782. } catch(e) {}
  3783. }
  3784. if ( elem ) {
  3785. this.empty().append( value );
  3786. }
  3787. }, null, value, arguments.length );
  3788. };
  3789. jQuery.prototype.index = function( elem ) {
  3790. /// <summary>
  3791. /// Search for a given element from among the matched elements.
  3792. /// &#10;1 - index()
  3793. /// &#10;2 - index(selector)
  3794. /// &#10;3 - index(element)
  3795. /// </summary>
  3796. /// <param name="elem" type="String">
  3797. /// A selector representing a jQuery collection in which to look for an element.
  3798. /// </param>
  3799. /// <returns type="Number" />
  3800. // No argument, return index in parent
  3801. if ( !elem ) {
  3802. return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
  3803. }
  3804. // index in selector
  3805. if ( typeof elem === "string" ) {
  3806. return jQuery.inArray( this[0], jQuery( elem ) );
  3807. }
  3808. // Locate the position of the desired element
  3809. return jQuery.inArray(
  3810. // If it receives a jQuery object, the first element is used
  3811. elem.jquery ? elem[0] : elem, this );
  3812. };
  3813. jQuery.prototype.init = function( selector, context, rootjQuery ) {
  3814. var match, elem;
  3815. // HANDLE: $(""), $(null), $(undefined), $(false)
  3816. if ( !selector ) {
  3817. return this;
  3818. }
  3819. // Handle HTML strings
  3820. if ( typeof selector === "string" ) {
  3821. if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
  3822. // Assume that strings that start and end with <> are HTML and skip the regex check
  3823. match = [ null, selector, null ];
  3824. } else {
  3825. match = rquickExpr.exec( selector );
  3826. }
  3827. // Match html or make sure no context is specified for #id
  3828. if ( match && (match[1] || !context) ) {
  3829. // HANDLE: $(html) -> $(array)
  3830. if ( match[1] ) {
  3831. context = context instanceof jQuery ? context[0] : context;
  3832. // scripts is true for back-compat
  3833. jQuery.merge( this, jQuery.parseHTML(
  3834. match[1],
  3835. context && context.nodeType ? context.ownerDocument || context : document,
  3836. true
  3837. ) );
  3838. // HANDLE: $(html, props)
  3839. if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
  3840. for ( match in context ) {
  3841. // Properties of context are called as methods if possible
  3842. if ( jQuery.isFunction( this[ match ] ) ) {
  3843. this[ match ]( context[ match ] );
  3844. // ...and otherwise set as attributes
  3845. } else {
  3846. this.attr( match, context[ match ] );
  3847. }
  3848. }
  3849. }
  3850. return this;
  3851. // HANDLE: $(#id)
  3852. } else {
  3853. elem = document.getElementById( match[2] );
  3854. // Check parentNode to catch when Blackberry 4.6 returns
  3855. // nodes that are no longer in the document #6963
  3856. if ( elem && elem.parentNode ) {
  3857. // Handle the case where IE and Opera return items
  3858. // by name instead of ID
  3859. if ( elem.id !== match[2] ) {
  3860. return rootjQuery.find( selector );
  3861. }
  3862. // Otherwise, we inject the element directly into the jQuery object
  3863. this.length = 1;
  3864. this[0] = elem;
  3865. }
  3866. this.context = document;
  3867. this.selector = selector;
  3868. return this;
  3869. }
  3870. // HANDLE: $(expr, $(...))
  3871. } else if ( !context || context.jquery ) {
  3872. return ( context || rootjQuery ).find( selector );
  3873. // HANDLE: $(expr, context)
  3874. // (which is just equivalent to: $(context).find(expr)
  3875. } else {
  3876. return this.constructor( context ).find( selector );
  3877. }
  3878. // HANDLE: $(DOMElement)
  3879. } else if ( selector.nodeType ) {
  3880. this.context = this[0] = selector;
  3881. this.length = 1;
  3882. return this;
  3883. // HANDLE: $(function)
  3884. // Shortcut for document ready
  3885. } else if ( jQuery.isFunction( selector ) ) {
  3886. return rootjQuery.ready( selector );
  3887. }
  3888. if ( selector.selector !== undefined ) {
  3889. this.selector = selector.selector;
  3890. this.context = selector.context;
  3891. }
  3892. return jQuery.makeArray( selector, this );
  3893. };
  3894. jQuery.prototype.innerHeight = function( margin, value ) {
  3895. /// <summary>
  3896. /// Get the current computed height for the first element in the set of matched elements, including padding but not border.
  3897. /// </summary>
  3898. /// <returns type="Number" />
  3899. var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
  3900. extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
  3901. return jQuery.access( this, function( elem, type, value ) {
  3902. var doc;
  3903. if ( jQuery.isWindow( elem ) ) {
  3904. // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
  3905. // isn't a whole lot we can do. See pull request at this URL for discussion:
  3906. // https://github.com/jquery/jquery/pull/764
  3907. return elem.document.documentElement[ "client" + name ];
  3908. }
  3909. // Get document width or height
  3910. if ( elem.nodeType === 9 ) {
  3911. doc = elem.documentElement;
  3912. // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
  3913. // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
  3914. return Math.max(
  3915. elem.body[ "scroll" + name ], doc[ "scroll" + name ],
  3916. elem.body[ "offset" + name ], doc[ "offset" + name ],
  3917. doc[ "client" + name ]
  3918. );
  3919. }
  3920. return value === undefined ?
  3921. // Get width or height on the element, requesting but not forcing parseFloat
  3922. jQuery.css( elem, type, extra ) :
  3923. // Set width or height on the element
  3924. jQuery.style( elem, type, value, extra );
  3925. }, type, chainable ? margin : undefined, chainable, null );
  3926. };
  3927. jQuery.prototype.innerWidth = function( margin, value ) {
  3928. /// <summary>
  3929. /// Get the current computed width for the first element in the set of matched elements, including padding but not border.
  3930. /// </summary>
  3931. /// <returns type="Number" />
  3932. var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
  3933. extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
  3934. return jQuery.access( this, function( elem, type, value ) {
  3935. var doc;
  3936. if ( jQuery.isWindow( elem ) ) {
  3937. // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
  3938. // isn't a whole lot we can do. See pull request at this URL for discussion:
  3939. // https://github.com/jquery/jquery/pull/764
  3940. return elem.document.documentElement[ "client" + name ];
  3941. }
  3942. // Get document width or height
  3943. if ( elem.nodeType === 9 ) {
  3944. doc = elem.documentElement;
  3945. // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
  3946. // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
  3947. return Math.max(
  3948. elem.body[ "scroll" + name ], doc[ "scroll" + name ],
  3949. elem.body[ "offset" + name ], doc[ "offset" + name ],
  3950. doc[ "client" + name ]
  3951. );
  3952. }
  3953. return value === undefined ?
  3954. // Get width or height on the element, requesting but not forcing parseFloat
  3955. jQuery.css( elem, type, extra ) :
  3956. // Set width or height on the element
  3957. jQuery.style( elem, type, value, extra );
  3958. }, type, chainable ? margin : undefined, chainable, null );
  3959. };
  3960. jQuery.prototype.insertAfter = function( selector ) {
  3961. /// <summary>
  3962. /// Insert every element in the set of matched elements after the target.
  3963. /// </summary>
  3964. /// <param name="selector" type="jQuery">
  3965. /// A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter.
  3966. /// </param>
  3967. /// <returns type="jQuery" />
  3968. var elems,
  3969. i = 0,
  3970. ret = [],
  3971. insert = jQuery( selector ),
  3972. last = insert.length - 1;
  3973. for ( ; i <= last; i++ ) {
  3974. elems = i === last ? this : this.clone(true);
  3975. jQuery( insert[i] )[ original ]( elems );
  3976. // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
  3977. core_push.apply( ret, elems.get() );
  3978. }
  3979. return this.pushStack( ret );
  3980. };
  3981. jQuery.prototype.insertBefore = function( selector ) {
  3982. /// <summary>
  3983. /// Insert every element in the set of matched elements before the target.
  3984. /// </summary>
  3985. /// <param name="selector" type="jQuery">
  3986. /// A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter.
  3987. /// </param>
  3988. /// <returns type="jQuery" />
  3989. var elems,
  3990. i = 0,
  3991. ret = [],
  3992. insert = jQuery( selector ),
  3993. last = insert.length - 1;
  3994. for ( ; i <= last; i++ ) {
  3995. elems = i === last ? this : this.clone(true);
  3996. jQuery( insert[i] )[ original ]( elems );
  3997. // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
  3998. core_push.apply( ret, elems.get() );
  3999. }
  4000. return this.pushStack( ret );
  4001. };
  4002. jQuery.prototype.is = function( selector ) {
  4003. /// <summary>
  4004. /// Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
  4005. /// &#10;1 - is(selector)
  4006. /// &#10;2 - is(function(index))
  4007. /// &#10;3 - is(jQuery object)
  4008. /// &#10;4 - is(element)
  4009. /// </summary>
  4010. /// <param name="selector" type="String">
  4011. /// A string containing a selector expression to match elements against.
  4012. /// </param>
  4013. /// <returns type="Boolean" />
  4014. return !!winnow(
  4015. this,
  4016. // If this is a positional/relative selector, check membership in the returned set
  4017. // so $("p:first").is("p:last") won't return true for a doc with two "p".
  4018. typeof selector === "string" && rneedsContext.test( selector ) ?
  4019. jQuery( selector ) :
  4020. selector || [],
  4021. false
  4022. ).length;
  4023. };
  4024. jQuery.prototype.keydown = function( data, fn ) {
  4025. /// <summary>
  4026. /// Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element.
  4027. /// &#10;1 - keydown(handler(eventObject))
  4028. /// &#10;2 - keydown(eventData, handler(eventObject))
  4029. /// &#10;3 - keydown()
  4030. /// </summary>
  4031. /// <param name="data" type="Object">
  4032. /// A map of data that will be passed to the event handler.
  4033. /// </param>
  4034. /// <param name="fn" type="Function">
  4035. /// A function to execute each time the event is triggered.
  4036. /// </param>
  4037. /// <returns type="jQuery" />
  4038. return arguments.length > 0 ?
  4039. this.on( name, null, data, fn ) :
  4040. this.trigger( name );
  4041. };
  4042. jQuery.prototype.keypress = function( data, fn ) {
  4043. /// <summary>
  4044. /// Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element.
  4045. /// &#10;1 - keypress(handler(eventObject))
  4046. /// &#10;2 - keypress(eventData, handler(eventObject))
  4047. /// &#10;3 - keypress()
  4048. /// </summary>
  4049. /// <param name="data" type="Object">
  4050. /// A map of data that will be passed to the event handler.
  4051. /// </param>
  4052. /// <param name="fn" type="Function">
  4053. /// A function to execute each time the event is triggered.
  4054. /// </param>
  4055. /// <returns type="jQuery" />
  4056. return arguments.length > 0 ?
  4057. this.on( name, null, data, fn ) :
  4058. this.trigger( name );
  4059. };
  4060. jQuery.prototype.keyup = function( data, fn ) {
  4061. /// <summary>
  4062. /// Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element.
  4063. /// &#10;1 - keyup(handler(eventObject))
  4064. /// &#10;2 - keyup(eventData, handler(eventObject))
  4065. /// &#10;3 - keyup()
  4066. /// </summary>
  4067. /// <param name="data" type="Object">
  4068. /// A map of data that will be passed to the event handler.
  4069. /// </param>
  4070. /// <param name="fn" type="Function">
  4071. /// A function to execute each time the event is triggered.
  4072. /// </param>
  4073. /// <returns type="jQuery" />
  4074. return arguments.length > 0 ?
  4075. this.on( name, null, data, fn ) :
  4076. this.trigger( name );
  4077. };
  4078. jQuery.prototype.last = function() {
  4079. /// <summary>
  4080. /// Reduce the set of matched elements to the final one in the set.
  4081. /// </summary>
  4082. /// <returns type="jQuery" />
  4083. return this.eq( -1 );
  4084. };
  4085. jQuery.prototype.length = 0;
  4086. jQuery.prototype.load = function( url, params, callback ) {
  4087. /// <summary>
  4088. /// 1: Bind an event handler to the "load" JavaScript event.
  4089. /// &#10; 1.1 - load(handler(eventObject))
  4090. /// &#10; 1.2 - load(eventData, handler(eventObject))
  4091. /// &#10;2: Load data from the server and place the returned HTML into the matched element.
  4092. /// &#10; 2.1 - load(url, data, complete(responseText, textStatus, XMLHttpRequest))
  4093. /// </summary>
  4094. /// <param name="url" type="String">
  4095. /// A string containing the URL to which the request is sent.
  4096. /// </param>
  4097. /// <param name="params" type="String">
  4098. /// A map or string that is sent to the server with the request.
  4099. /// </param>
  4100. /// <param name="callback" type="Function">
  4101. /// A callback function that is executed when the request completes.
  4102. /// </param>
  4103. /// <returns type="jQuery" />
  4104. if ( typeof url !== "string" && _load ) {
  4105. return _load.apply( this, arguments );
  4106. }
  4107. var selector, response, type,
  4108. self = this,
  4109. off = url.indexOf(" ");
  4110. if ( off >= 0 ) {
  4111. selector = url.slice( off, url.length );
  4112. url = url.slice( 0, off );
  4113. }
  4114. // If it's a function
  4115. if ( jQuery.isFunction( params ) ) {
  4116. // We assume that it's the callback
  4117. callback = params;
  4118. params = undefined;
  4119. // Otherwise, build a param string
  4120. } else if ( params && typeof params === "object" ) {
  4121. type = "POST";
  4122. }
  4123. // If we have elements to modify, make the request
  4124. if ( self.length > 0 ) {
  4125. jQuery.ajax({
  4126. url: url,
  4127. // if "type" variable is undefined, then "GET" method will be used
  4128. type: type,
  4129. dataType: "html",
  4130. data: params
  4131. }).done(function( responseText ) {
  4132. // Save response for use in complete callback
  4133. response = arguments;
  4134. self.html( selector ?
  4135. // If a selector was specified, locate the right elements in a dummy div
  4136. // Exclude scripts to avoid IE 'Permission Denied' errors
  4137. jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
  4138. // Otherwise use the full result
  4139. responseText );
  4140. }).complete( callback && function( jqXHR, status ) {
  4141. self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
  4142. });
  4143. }
  4144. return this;
  4145. };
  4146. jQuery.prototype.map = function( callback ) {
  4147. /// <summary>
  4148. /// Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.
  4149. /// </summary>
  4150. /// <param name="callback" type="Function">
  4151. /// A function object that will be invoked for each element in the current set.
  4152. /// </param>
  4153. /// <returns type="jQuery" />
  4154. return this.pushStack( jQuery.map(this, function( elem, i ) {
  4155. return callback.call( elem, i, elem );
  4156. }));
  4157. };
  4158. jQuery.prototype.mousedown = function( data, fn ) {
  4159. /// <summary>
  4160. /// Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element.
  4161. /// &#10;1 - mousedown(handler(eventObject))
  4162. /// &#10;2 - mousedown(eventData, handler(eventObject))
  4163. /// &#10;3 - mousedown()
  4164. /// </summary>
  4165. /// <param name="data" type="Object">
  4166. /// A map of data that will be passed to the event handler.
  4167. /// </param>
  4168. /// <param name="fn" type="Function">
  4169. /// A function to execute each time the event is triggered.
  4170. /// </param>
  4171. /// <returns type="jQuery" />
  4172. return arguments.length > 0 ?
  4173. this.on( name, null, data, fn ) :
  4174. this.trigger( name );
  4175. };
  4176. jQuery.prototype.mouseenter = function( data, fn ) {
  4177. /// <summary>
  4178. /// Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element.
  4179. /// &#10;1 - mouseenter(handler(eventObject))
  4180. /// &#10;2 - mouseenter(eventData, handler(eventObject))
  4181. /// &#10;3 - mouseenter()
  4182. /// </summary>
  4183. /// <param name="data" type="Object">
  4184. /// A map of data that will be passed to the event handler.
  4185. /// </param>
  4186. /// <param name="fn" type="Function">
  4187. /// A function to execute each time the event is triggered.
  4188. /// </param>
  4189. /// <returns type="jQuery" />
  4190. return arguments.length > 0 ?
  4191. this.on( name, null, data, fn ) :
  4192. this.trigger( name );
  4193. };
  4194. jQuery.prototype.mouseleave = function( data, fn ) {
  4195. /// <summary>
  4196. /// Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element.
  4197. /// &#10;1 - mouseleave(handler(eventObject))
  4198. /// &#10;2 - mouseleave(eventData, handler(eventObject))
  4199. /// &#10;3 - mouseleave()
  4200. /// </summary>
  4201. /// <param name="data" type="Object">
  4202. /// A map of data that will be passed to the event handler.
  4203. /// </param>
  4204. /// <param name="fn" type="Function">
  4205. /// A function to execute each time the event is triggered.
  4206. /// </param>
  4207. /// <returns type="jQuery" />
  4208. return arguments.length > 0 ?
  4209. this.on( name, null, data, fn ) :
  4210. this.trigger( name );
  4211. };
  4212. jQuery.prototype.mousemove = function( data, fn ) {
  4213. /// <summary>
  4214. /// Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element.
  4215. /// &#10;1 - mousemove(handler(eventObject))
  4216. /// &#10;2 - mousemove(eventData, handler(eventObject))
  4217. /// &#10;3 - mousemove()
  4218. /// </summary>
  4219. /// <param name="data" type="Object">
  4220. /// A map of data that will be passed to the event handler.
  4221. /// </param>
  4222. /// <param name="fn" type="Function">
  4223. /// A function to execute each time the event is triggered.
  4224. /// </param>
  4225. /// <returns type="jQuery" />
  4226. return arguments.length > 0 ?
  4227. this.on( name, null, data, fn ) :
  4228. this.trigger( name );
  4229. };
  4230. jQuery.prototype.mouseout = function( data, fn ) {
  4231. /// <summary>
  4232. /// Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element.
  4233. /// &#10;1 - mouseout(handler(eventObject))
  4234. /// &#10;2 - mouseout(eventData, handler(eventObject))
  4235. /// &#10;3 - mouseout()
  4236. /// </summary>
  4237. /// <param name="data" type="Object">
  4238. /// A map of data that will be passed to the event handler.
  4239. /// </param>
  4240. /// <param name="fn" type="Function">
  4241. /// A function to execute each time the event is triggered.
  4242. /// </param>
  4243. /// <returns type="jQuery" />
  4244. return arguments.length > 0 ?
  4245. this.on( name, null, data, fn ) :
  4246. this.trigger( name );
  4247. };
  4248. jQuery.prototype.mouseover = function( data, fn ) {
  4249. /// <summary>
  4250. /// Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element.
  4251. /// &#10;1 - mouseover(handler(eventObject))
  4252. /// &#10;2 - mouseover(eventData, handler(eventObject))
  4253. /// &#10;3 - mouseover()
  4254. /// </summary>
  4255. /// <param name="data" type="Object">
  4256. /// A map of data that will be passed to the event handler.
  4257. /// </param>
  4258. /// <param name="fn" type="Function">
  4259. /// A function to execute each time the event is triggered.
  4260. /// </param>
  4261. /// <returns type="jQuery" />
  4262. return arguments.length > 0 ?
  4263. this.on( name, null, data, fn ) :
  4264. this.trigger( name );
  4265. };
  4266. jQuery.prototype.mouseup = function( data, fn ) {
  4267. /// <summary>
  4268. /// Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element.
  4269. /// &#10;1 - mouseup(handler(eventObject))
  4270. /// &#10;2 - mouseup(eventData, handler(eventObject))
  4271. /// &#10;3 - mouseup()
  4272. /// </summary>
  4273. /// <param name="data" type="Object">
  4274. /// A map of data that will be passed to the event handler.
  4275. /// </param>
  4276. /// <param name="fn" type="Function">
  4277. /// A function to execute each time the event is triggered.
  4278. /// </param>
  4279. /// <returns type="jQuery" />
  4280. return arguments.length > 0 ?
  4281. this.on( name, null, data, fn ) :
  4282. this.trigger( name );
  4283. };
  4284. jQuery.prototype.next = function( until, selector ) {
  4285. /// <summary>
  4286. /// Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.
  4287. /// </summary>
  4288. /// <param name="until" type="String">
  4289. /// A string containing a selector expression to match elements against.
  4290. /// </param>
  4291. /// <returns type="jQuery" />
  4292. var ret = jQuery.map( this, fn, until );
  4293. if ( name.slice( -5 ) !== "Until" ) {
  4294. selector = until;
  4295. }
  4296. if ( selector && typeof selector === "string" ) {
  4297. ret = jQuery.filter( selector, ret );
  4298. }
  4299. if ( this.length > 1 ) {
  4300. // Remove duplicates
  4301. if ( !guaranteedUnique[ name ] ) {
  4302. ret = jQuery.unique( ret );
  4303. }
  4304. // Reverse order for parents* and prev-derivatives
  4305. if ( rparentsprev.test( name ) ) {
  4306. ret = ret.reverse();
  4307. }
  4308. }
  4309. return this.pushStack( ret );
  4310. };
  4311. jQuery.prototype.nextAll = function( until, selector ) {
  4312. /// <summary>
  4313. /// Get all following siblings of each element in the set of matched elements, optionally filtered by a selector.
  4314. /// </summary>
  4315. /// <param name="until" type="String">
  4316. /// A string containing a selector expression to match elements against.
  4317. /// </param>
  4318. /// <returns type="jQuery" />
  4319. var ret = jQuery.map( this, fn, until );
  4320. if ( name.slice( -5 ) !== "Until" ) {
  4321. selector = until;
  4322. }
  4323. if ( selector && typeof selector === "string" ) {
  4324. ret = jQuery.filter( selector, ret );
  4325. }
  4326. if ( this.length > 1 ) {
  4327. // Remove duplicates
  4328. if ( !guaranteedUnique[ name ] ) {
  4329. ret = jQuery.unique( ret );
  4330. }
  4331. // Reverse order for parents* and prev-derivatives
  4332. if ( rparentsprev.test( name ) ) {
  4333. ret = ret.reverse();
  4334. }
  4335. }
  4336. return this.pushStack( ret );
  4337. };
  4338. jQuery.prototype.nextUntil = function( until, selector ) {
  4339. /// <summary>
  4340. /// Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
  4341. /// &#10;1 - nextUntil(selector, filter)
  4342. /// &#10;2 - nextUntil(element, filter)
  4343. /// </summary>
  4344. /// <param name="until" type="String">
  4345. /// A string containing a selector expression to indicate where to stop matching following sibling elements.
  4346. /// </param>
  4347. /// <param name="selector" type="String">
  4348. /// A string containing a selector expression to match elements against.
  4349. /// </param>
  4350. /// <returns type="jQuery" />
  4351. var ret = jQuery.map( this, fn, until );
  4352. if ( name.slice( -5 ) !== "Until" ) {
  4353. selector = until;
  4354. }
  4355. if ( selector && typeof selector === "string" ) {
  4356. ret = jQuery.filter( selector, ret );
  4357. }
  4358. if ( this.length > 1 ) {
  4359. // Remove duplicates
  4360. if ( !guaranteedUnique[ name ] ) {
  4361. ret = jQuery.unique( ret );
  4362. }
  4363. // Reverse order for parents* and prev-derivatives
  4364. if ( rparentsprev.test( name ) ) {
  4365. ret = ret.reverse();
  4366. }
  4367. }
  4368. return this.pushStack( ret );
  4369. };
  4370. jQuery.prototype.not = function( selector ) {
  4371. /// <summary>
  4372. /// Remove elements from the set of matched elements.
  4373. /// &#10;1 - not(selector)
  4374. /// &#10;2 - not(elements)
  4375. /// &#10;3 - not(function(index))
  4376. /// &#10;4 - not(jQuery object)
  4377. /// </summary>
  4378. /// <param name="selector" type="String">
  4379. /// A string containing a selector expression to match elements against.
  4380. /// </param>
  4381. /// <returns type="jQuery" />
  4382. return this.pushStack( winnow(this, selector || [], true) );
  4383. };
  4384. jQuery.prototype.off = function( types, selector, fn ) {
  4385. /// <summary>
  4386. /// Remove an event handler.
  4387. /// &#10;1 - off(events, selector, handler(eventObject))
  4388. /// &#10;2 - off(events-map, selector)
  4389. /// </summary>
  4390. /// <param name="types" type="String">
  4391. /// One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
  4392. /// </param>
  4393. /// <param name="selector" type="String">
  4394. /// A selector which should match the one originally passed to .on() when attaching event handlers.
  4395. /// </param>
  4396. /// <param name="fn" type="Function">
  4397. /// A handler function previously attached for the event(s), or the special value false.
  4398. /// </param>
  4399. /// <returns type="jQuery" />
  4400. var handleObj, type;
  4401. if ( types && types.preventDefault && types.handleObj ) {
  4402. // ( event ) dispatched jQuery.Event
  4403. handleObj = types.handleObj;
  4404. jQuery( types.delegateTarget ).off(
  4405. handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
  4406. handleObj.selector,
  4407. handleObj.handler
  4408. );
  4409. return this;
  4410. }
  4411. if ( typeof types === "object" ) {
  4412. // ( types-object [, selector] )
  4413. for ( type in types ) {
  4414. this.off( type, selector, types[ type ] );
  4415. }
  4416. return this;
  4417. }
  4418. if ( selector === false || typeof selector === "function" ) {
  4419. // ( types [, fn] )
  4420. fn = selector;
  4421. selector = undefined;
  4422. }
  4423. if ( fn === false ) {
  4424. fn = returnFalse;
  4425. }
  4426. return this.each(function() {
  4427. jQuery.event.remove( this, types, fn, selector );
  4428. });
  4429. };
  4430. jQuery.prototype.offset = function( options ) {
  4431. /// <summary>
  4432. /// 1: Get the current coordinates of the first element in the set of matched elements, relative to the document.
  4433. /// &#10; 1.1 - offset()
  4434. /// &#10;2: Set the current coordinates of every element in the set of matched elements, relative to the document.
  4435. /// &#10; 2.1 - offset(coordinates)
  4436. /// &#10; 2.2 - offset(function(index, coords))
  4437. /// </summary>
  4438. /// <param name="options" type="Object">
  4439. /// An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
  4440. /// </param>
  4441. /// <returns type="jQuery" />
  4442. if ( arguments.length ) {
  4443. return options === undefined ?
  4444. this :
  4445. this.each(function( i ) {
  4446. jQuery.offset.setOffset( this, options, i );
  4447. });
  4448. }
  4449. var docElem, win,
  4450. box = { top: 0, left: 0 },
  4451. elem = this[ 0 ],
  4452. doc = elem && elem.ownerDocument;
  4453. if ( !doc ) {
  4454. return;
  4455. }
  4456. docElem = doc.documentElement;
  4457. // Make sure it's not a disconnected DOM node
  4458. if ( !jQuery.contains( docElem, elem ) ) {
  4459. return box;
  4460. }
  4461. // If we don't have gBCR, just use 0,0 rather than error
  4462. // BlackBerry 5, iOS 3 (original iPhone)
  4463. if ( typeof elem.getBoundingClientRect !== core_strundefined ) {
  4464. box = elem.getBoundingClientRect();
  4465. }
  4466. win = getWindow( doc );
  4467. return {
  4468. top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
  4469. left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
  4470. };
  4471. };
  4472. jQuery.prototype.offsetParent = function() {
  4473. /// <summary>
  4474. /// Get the closest ancestor element that is positioned.
  4475. /// </summary>
  4476. /// <returns type="jQuery" />
  4477. return this.map(function() {
  4478. var offsetParent = this.offsetParent || docElem;
  4479. while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
  4480. offsetParent = offsetParent.offsetParent;
  4481. }
  4482. return offsetParent || docElem;
  4483. });
  4484. };
  4485. jQuery.prototype.on = function( types, selector, data, fn, /*INTERNAL*/ one ) {
  4486. /// <summary>
  4487. /// Attach an event handler function for one or more events to the selected elements.
  4488. /// &#10;1 - on(events, selector, data, handler(eventObject))
  4489. /// &#10;2 - on(events-map, selector, data)
  4490. /// </summary>
  4491. /// <param name="types" type="String">
  4492. /// One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
  4493. /// </param>
  4494. /// <param name="selector" type="String">
  4495. /// A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
  4496. /// </param>
  4497. /// <param name="data" type="Anything">
  4498. /// Data to be passed to the handler in event.data when an event is triggered.
  4499. /// </param>
  4500. /// <param name="fn" type="Function">
  4501. /// A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
  4502. /// </param>
  4503. /// <returns type="jQuery" />
  4504. var type, origFn;
  4505. // Types can be a map of types/handlers
  4506. if ( typeof types === "object" ) {
  4507. // ( types-Object, selector, data )
  4508. if ( typeof selector !== "string" ) {
  4509. // ( types-Object, data )
  4510. data = data || selector;
  4511. selector = undefined;
  4512. }
  4513. for ( type in types ) {
  4514. this.on( type, selector, data, types[ type ], one );
  4515. }
  4516. return this;
  4517. }
  4518. if ( data == null && fn == null ) {
  4519. // ( types, fn )
  4520. fn = selector;
  4521. data = selector = undefined;
  4522. } else if ( fn == null ) {
  4523. if ( typeof selector === "string" ) {
  4524. // ( types, selector, fn )
  4525. fn = data;
  4526. data = undefined;
  4527. } else {
  4528. // ( types, data, fn )
  4529. fn = data;
  4530. data = selector;
  4531. selector = undefined;
  4532. }
  4533. }
  4534. if ( fn === false ) {
  4535. fn = returnFalse;
  4536. } else if ( !fn ) {
  4537. return this;
  4538. }
  4539. if ( one === 1 ) {
  4540. origFn = fn;
  4541. fn = function( event ) {
  4542. // Can use an empty set, since event contains the info
  4543. jQuery().off( event );
  4544. return origFn.apply( this, arguments );
  4545. };
  4546. // Use same guid so caller can remove using origFn
  4547. fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
  4548. }
  4549. return this.each( function() {
  4550. jQuery.event.add( this, types, fn, data, selector );
  4551. });
  4552. };
  4553. jQuery.prototype.one = function( types, selector, data, fn ) {
  4554. /// <summary>
  4555. /// Attach a handler to an event for the elements. The handler is executed at most once per element.
  4556. /// &#10;1 - one(events, data, handler(eventObject))
  4557. /// &#10;2 - one(events, selector, data, handler(eventObject))
  4558. /// &#10;3 - one(events-map, selector, data)
  4559. /// </summary>
  4560. /// <param name="types" type="String">
  4561. /// One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
  4562. /// </param>
  4563. /// <param name="selector" type="String">
  4564. /// A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
  4565. /// </param>
  4566. /// <param name="data" type="Anything">
  4567. /// Data to be passed to the handler in event.data when an event is triggered.
  4568. /// </param>
  4569. /// <param name="fn" type="Function">
  4570. /// A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
  4571. /// </param>
  4572. /// <returns type="jQuery" />
  4573. return this.on( types, selector, data, fn, 1 );
  4574. };
  4575. jQuery.prototype.outerHeight = function( margin, value ) {
  4576. /// <summary>
  4577. /// Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns an integer (without "px") representation of the value or null if called on an empty set of elements.
  4578. /// </summary>
  4579. /// <param name="margin" type="Boolean">
  4580. /// A Boolean indicating whether to include the element's margin in the calculation.
  4581. /// </param>
  4582. /// <returns type="Number" />
  4583. var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
  4584. extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
  4585. return jQuery.access( this, function( elem, type, value ) {
  4586. var doc;
  4587. if ( jQuery.isWindow( elem ) ) {
  4588. // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
  4589. // isn't a whole lot we can do. See pull request at this URL for discussion:
  4590. // https://github.com/jquery/jquery/pull/764
  4591. return elem.document.documentElement[ "client" + name ];
  4592. }
  4593. // Get document width or height
  4594. if ( elem.nodeType === 9 ) {
  4595. doc = elem.documentElement;
  4596. // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
  4597. // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
  4598. return Math.max(
  4599. elem.body[ "scroll" + name ], doc[ "scroll" + name ],
  4600. elem.body[ "offset" + name ], doc[ "offset" + name ],
  4601. doc[ "client" + name ]
  4602. );
  4603. }
  4604. return value === undefined ?
  4605. // Get width or height on the element, requesting but not forcing parseFloat
  4606. jQuery.css( elem, type, extra ) :
  4607. // Set width or height on the element
  4608. jQuery.style( elem, type, value, extra );
  4609. }, type, chainable ? margin : undefined, chainable, null );
  4610. };
  4611. jQuery.prototype.outerWidth = function( margin, value ) {
  4612. /// <summary>
  4613. /// Get the current computed width for the first element in the set of matched elements, including padding and border.
  4614. /// </summary>
  4615. /// <param name="margin" type="Boolean">
  4616. /// A Boolean indicating whether to include the element's margin in the calculation.
  4617. /// </param>
  4618. /// <returns type="Number" />
  4619. var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
  4620. extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
  4621. return jQuery.access( this, function( elem, type, value ) {
  4622. var doc;
  4623. if ( jQuery.isWindow( elem ) ) {
  4624. // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
  4625. // isn't a whole lot we can do. See pull request at this URL for discussion:
  4626. // https://github.com/jquery/jquery/pull/764
  4627. return elem.document.documentElement[ "client" + name ];
  4628. }
  4629. // Get document width or height
  4630. if ( elem.nodeType === 9 ) {
  4631. doc = elem.documentElement;
  4632. // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
  4633. // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
  4634. return Math.max(
  4635. elem.body[ "scroll" + name ], doc[ "scroll" + name ],
  4636. elem.body[ "offset" + name ], doc[ "offset" + name ],
  4637. doc[ "client" + name ]
  4638. );
  4639. }
  4640. return value === undefined ?
  4641. // Get width or height on the element, requesting but not forcing parseFloat
  4642. jQuery.css( elem, type, extra ) :
  4643. // Set width or height on the element
  4644. jQuery.style( elem, type, value, extra );
  4645. }, type, chainable ? margin : undefined, chainable, null );
  4646. };
  4647. jQuery.prototype.parent = function( until, selector ) {
  4648. /// <summary>
  4649. /// Get the parent of each element in the current set of matched elements, optionally filtered by a selector.
  4650. /// </summary>
  4651. /// <param name="until" type="String">
  4652. /// A string containing a selector expression to match elements against.
  4653. /// </param>
  4654. /// <returns type="jQuery" />
  4655. var ret = jQuery.map( this, fn, until );
  4656. if ( name.slice( -5 ) !== "Until" ) {
  4657. selector = until;
  4658. }
  4659. if ( selector && typeof selector === "string" ) {
  4660. ret = jQuery.filter( selector, ret );
  4661. }
  4662. if ( this.length > 1 ) {
  4663. // Remove duplicates
  4664. if ( !guaranteedUnique[ name ] ) {
  4665. ret = jQuery.unique( ret );
  4666. }
  4667. // Reverse order for parents* and prev-derivatives
  4668. if ( rparentsprev.test( name ) ) {
  4669. ret = ret.reverse();
  4670. }
  4671. }
  4672. return this.pushStack( ret );
  4673. };
  4674. jQuery.prototype.parents = function( until, selector ) {
  4675. /// <summary>
  4676. /// Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector.
  4677. /// </summary>
  4678. /// <param name="until" type="String">
  4679. /// A string containing a selector expression to match elements against.
  4680. /// </param>
  4681. /// <returns type="jQuery" />
  4682. var ret = jQuery.map( this, fn, until );
  4683. if ( name.slice( -5 ) !== "Until" ) {
  4684. selector = until;
  4685. }
  4686. if ( selector && typeof selector === "string" ) {
  4687. ret = jQuery.filter( selector, ret );
  4688. }
  4689. if ( this.length > 1 ) {
  4690. // Remove duplicates
  4691. if ( !guaranteedUnique[ name ] ) {
  4692. ret = jQuery.unique( ret );
  4693. }
  4694. // Reverse order for parents* and prev-derivatives
  4695. if ( rparentsprev.test( name ) ) {
  4696. ret = ret.reverse();
  4697. }
  4698. }
  4699. return this.pushStack( ret );
  4700. };
  4701. jQuery.prototype.parentsUntil = function( until, selector ) {
  4702. /// <summary>
  4703. /// Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.
  4704. /// &#10;1 - parentsUntil(selector, filter)
  4705. /// &#10;2 - parentsUntil(element, filter)
  4706. /// </summary>
  4707. /// <param name="until" type="String">
  4708. /// A string containing a selector expression to indicate where to stop matching ancestor elements.
  4709. /// </param>
  4710. /// <param name="selector" type="String">
  4711. /// A string containing a selector expression to match elements against.
  4712. /// </param>
  4713. /// <returns type="jQuery" />
  4714. var ret = jQuery.map( this, fn, until );
  4715. if ( name.slice( -5 ) !== "Until" ) {
  4716. selector = until;
  4717. }
  4718. if ( selector && typeof selector === "string" ) {
  4719. ret = jQuery.filter( selector, ret );
  4720. }
  4721. if ( this.length > 1 ) {
  4722. // Remove duplicates
  4723. if ( !guaranteedUnique[ name ] ) {
  4724. ret = jQuery.unique( ret );
  4725. }
  4726. // Reverse order for parents* and prev-derivatives
  4727. if ( rparentsprev.test( name ) ) {
  4728. ret = ret.reverse();
  4729. }
  4730. }
  4731. return this.pushStack( ret );
  4732. };
  4733. jQuery.prototype.position = function() {
  4734. /// <summary>
  4735. /// Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.
  4736. /// </summary>
  4737. /// <returns type="Object" />
  4738. if ( !this[ 0 ] ) {
  4739. return;
  4740. }
  4741. var offsetParent, offset,
  4742. parentOffset = { top: 0, left: 0 },
  4743. elem = this[ 0 ];
  4744. // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent
  4745. if ( jQuery.css( elem, "position" ) === "fixed" ) {
  4746. // we assume that getBoundingClientRect is available when computed position is fixed
  4747. offset = elem.getBoundingClientRect();
  4748. } else {
  4749. // Get *real* offsetParent
  4750. offsetParent = this.offsetParent();
  4751. // Get correct offsets
  4752. offset = this.offset();
  4753. if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
  4754. parentOffset = offsetParent.offset();
  4755. }
  4756. // Add offsetParent borders
  4757. parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
  4758. parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
  4759. }
  4760. // Subtract parent offsets and element margins
  4761. // note: when an element has margin: auto the offsetLeft and marginLeft
  4762. // are the same in Safari causing offset.left to incorrectly be 0
  4763. return {
  4764. top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
  4765. left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
  4766. };
  4767. };
  4768. jQuery.prototype.prepend = function() {
  4769. /// <summary>
  4770. /// Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
  4771. /// &#10;1 - prepend(content, content)
  4772. /// &#10;2 - prepend(function(index, html))
  4773. /// </summary>
  4774. /// <param name="" type="jQuery">
  4775. /// DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements.
  4776. /// </param>
  4777. /// <param name="" type="jQuery">
  4778. /// One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements.
  4779. /// </param>
  4780. /// <returns type="jQuery" />
  4781. return this.domManip( arguments, function( elem ) {
  4782. if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
  4783. var target = manipulationTarget( this, elem );
  4784. target.insertBefore( elem, target.firstChild );
  4785. }
  4786. });
  4787. };
  4788. jQuery.prototype.prependTo = function( selector ) {
  4789. /// <summary>
  4790. /// Insert every element in the set of matched elements to the beginning of the target.
  4791. /// </summary>
  4792. /// <param name="selector" type="jQuery">
  4793. /// A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted at the beginning of the element(s) specified by this parameter.
  4794. /// </param>
  4795. /// <returns type="jQuery" />
  4796. var elems,
  4797. i = 0,
  4798. ret = [],
  4799. insert = jQuery( selector ),
  4800. last = insert.length - 1;
  4801. for ( ; i <= last; i++ ) {
  4802. elems = i === last ? this : this.clone(true);
  4803. jQuery( insert[i] )[ original ]( elems );
  4804. // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
  4805. core_push.apply( ret, elems.get() );
  4806. }
  4807. return this.pushStack( ret );
  4808. };
  4809. jQuery.prototype.prev = function( until, selector ) {
  4810. /// <summary>
  4811. /// Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector.
  4812. /// </summary>
  4813. /// <param name="until" type="String">
  4814. /// A string containing a selector expression to match elements against.
  4815. /// </param>
  4816. /// <returns type="jQuery" />
  4817. var ret = jQuery.map( this, fn, until );
  4818. if ( name.slice( -5 ) !== "Until" ) {
  4819. selector = until;
  4820. }
  4821. if ( selector && typeof selector === "string" ) {
  4822. ret = jQuery.filter( selector, ret );
  4823. }
  4824. if ( this.length > 1 ) {
  4825. // Remove duplicates
  4826. if ( !guaranteedUnique[ name ] ) {
  4827. ret = jQuery.unique( ret );
  4828. }
  4829. // Reverse order for parents* and prev-derivatives
  4830. if ( rparentsprev.test( name ) ) {
  4831. ret = ret.reverse();
  4832. }
  4833. }
  4834. return this.pushStack( ret );
  4835. };
  4836. jQuery.prototype.prevAll = function( until, selector ) {
  4837. /// <summary>
  4838. /// Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector.
  4839. /// </summary>
  4840. /// <param name="until" type="String">
  4841. /// A string containing a selector expression to match elements against.
  4842. /// </param>
  4843. /// <returns type="jQuery" />
  4844. var ret = jQuery.map( this, fn, until );
  4845. if ( name.slice( -5 ) !== "Until" ) {
  4846. selector = until;
  4847. }
  4848. if ( selector && typeof selector === "string" ) {
  4849. ret = jQuery.filter( selector, ret );
  4850. }
  4851. if ( this.length > 1 ) {
  4852. // Remove duplicates
  4853. if ( !guaranteedUnique[ name ] ) {
  4854. ret = jQuery.unique( ret );
  4855. }
  4856. // Reverse order for parents* and prev-derivatives
  4857. if ( rparentsprev.test( name ) ) {
  4858. ret = ret.reverse();
  4859. }
  4860. }
  4861. return this.pushStack( ret );
  4862. };
  4863. jQuery.prototype.prevUntil = function( until, selector ) {
  4864. /// <summary>
  4865. /// Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
  4866. /// &#10;1 - prevUntil(selector, filter)
  4867. /// &#10;2 - prevUntil(element, filter)
  4868. /// </summary>
  4869. /// <param name="until" type="String">
  4870. /// A string containing a selector expression to indicate where to stop matching preceding sibling elements.
  4871. /// </param>
  4872. /// <param name="selector" type="String">
  4873. /// A string containing a selector expression to match elements against.
  4874. /// </param>
  4875. /// <returns type="jQuery" />
  4876. var ret = jQuery.map( this, fn, until );
  4877. if ( name.slice( -5 ) !== "Until" ) {
  4878. selector = until;
  4879. }
  4880. if ( selector && typeof selector === "string" ) {
  4881. ret = jQuery.filter( selector, ret );
  4882. }
  4883. if ( this.length > 1 ) {
  4884. // Remove duplicates
  4885. if ( !guaranteedUnique[ name ] ) {
  4886. ret = jQuery.unique( ret );
  4887. }
  4888. // Reverse order for parents* and prev-derivatives
  4889. if ( rparentsprev.test( name ) ) {
  4890. ret = ret.reverse();
  4891. }
  4892. }
  4893. return this.pushStack( ret );
  4894. };
  4895. jQuery.prototype.promise = function( type, obj ) {
  4896. /// <summary>
  4897. /// Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.
  4898. /// </summary>
  4899. /// <param name="type" type="String">
  4900. /// The type of queue that needs to be observed.
  4901. /// </param>
  4902. /// <param name="obj" type="Object">
  4903. /// Object onto which the promise methods have to be attached
  4904. /// </param>
  4905. /// <returns type="Promise" />
  4906. var tmp,
  4907. count = 1,
  4908. defer = jQuery.Deferred(),
  4909. elements = this,
  4910. i = this.length,
  4911. resolve = function() {
  4912. if ( !( --count ) ) {
  4913. defer.resolveWith( elements, [ elements ] );
  4914. }
  4915. };
  4916. if ( typeof type !== "string" ) {
  4917. obj = type;
  4918. type = undefined;
  4919. }
  4920. type = type || "fx";
  4921. while( i-- ) {
  4922. tmp = jQuery._data( elements[ i ], type + "queueHooks" );
  4923. if ( tmp && tmp.empty ) {
  4924. count++;
  4925. tmp.empty.add( resolve );
  4926. }
  4927. }
  4928. resolve();
  4929. return defer.promise( obj );
  4930. };
  4931. jQuery.prototype.prop = function( name, value ) {
  4932. /// <summary>
  4933. /// 1: Get the value of a property for the first element in the set of matched elements.
  4934. /// &#10; 1.1 - prop(propertyName)
  4935. /// &#10;2: Set one or more properties for the set of matched elements.
  4936. /// &#10; 2.1 - prop(propertyName, value)
  4937. /// &#10; 2.2 - prop(map)
  4938. /// &#10; 2.3 - prop(propertyName, function(index, oldPropertyValue))
  4939. /// </summary>
  4940. /// <param name="name" type="String">
  4941. /// The name of the property to set.
  4942. /// </param>
  4943. /// <param name="value" type="Boolean">
  4944. /// A value to set for the property.
  4945. /// </param>
  4946. /// <returns type="jQuery" />
  4947. return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
  4948. };
  4949. jQuery.prototype.pushStack = function( elems ) {
  4950. /// <summary>
  4951. /// Add a collection of DOM elements onto the jQuery stack.
  4952. /// &#10;1 - pushStack(elements)
  4953. /// &#10;2 - pushStack(elements, name, arguments)
  4954. /// </summary>
  4955. /// <param name="elems" type="Array">
  4956. /// An array of elements to push onto the stack and make into a new jQuery object.
  4957. /// </param>
  4958. /// <param name="" type="String">
  4959. /// The name of a jQuery method that generated the array of elements.
  4960. /// </param>
  4961. /// <param name="" type="Array">
  4962. /// The arguments that were passed in to the jQuery method (for serialization).
  4963. /// </param>
  4964. /// <returns type="jQuery" />
  4965. // Build a new jQuery matched element set
  4966. var ret = jQuery.merge( this.constructor(), elems );
  4967. // Add the old object onto the stack (as a reference)
  4968. ret.prevObject = this;
  4969. ret.context = this.context;
  4970. // Return the newly-formed element set
  4971. return ret;
  4972. };
  4973. jQuery.prototype.queue = function( type, data ) {
  4974. /// <summary>
  4975. /// 1: Show the queue of functions to be executed on the matched elements.
  4976. /// &#10; 1.1 - queue(queueName)
  4977. /// &#10;2: Manipulate the queue of functions to be executed on the matched elements.
  4978. /// &#10; 2.1 - queue(queueName, newQueue)
  4979. /// &#10; 2.2 - queue(queueName, callback( next ))
  4980. /// </summary>
  4981. /// <param name="type" type="String">
  4982. /// A string containing the name of the queue. Defaults to fx, the standard effects queue.
  4983. /// </param>
  4984. /// <param name="data" type="Array">
  4985. /// An array of functions to replace the current queue contents.
  4986. /// </param>
  4987. /// <returns type="jQuery" />
  4988. var setter = 2;
  4989. if ( typeof type !== "string" ) {
  4990. data = type;
  4991. type = "fx";
  4992. setter--;
  4993. }
  4994. if ( arguments.length < setter ) {
  4995. return jQuery.queue( this[0], type );
  4996. }
  4997. return data === undefined ?
  4998. this :
  4999. this.each(function() {
  5000. var queue = jQuery.queue( this, type, data );
  5001. // ensure a hooks for this queue
  5002. jQuery._queueHooks( this, type );
  5003. if ( type === "fx" && queue[0] !== "inprogress" ) {
  5004. jQuery.dequeue( this, type );
  5005. }
  5006. });
  5007. };
  5008. jQuery.prototype.ready = function( fn ) {
  5009. /// <summary>
  5010. /// Specify a function to execute when the DOM is fully loaded.
  5011. /// </summary>
  5012. /// <param name="fn" type="Function">
  5013. /// A function to execute after the DOM is ready.
  5014. /// </param>
  5015. /// <returns type="jQuery" />
  5016. // Add the callback
  5017. jQuery.ready.promise().done( fn );
  5018. return this;
  5019. };
  5020. jQuery.prototype.remove = function( selector, keepData ) {
  5021. /// <summary>
  5022. /// Remove the set of matched elements from the DOM.
  5023. /// </summary>
  5024. /// <param name="selector" type="String">
  5025. /// A selector expression that filters the set of matched elements to be removed.
  5026. /// </param>
  5027. /// <returns type="jQuery" />
  5028. var elem,
  5029. elems = selector ? jQuery.filter( selector, this ) : this,
  5030. i = 0;
  5031. for ( ; (elem = elems[i]) != null; i++ ) {
  5032. if ( !keepData && elem.nodeType === 1 ) {
  5033. jQuery.cleanData( getAll( elem ) );
  5034. }
  5035. if ( elem.parentNode ) {
  5036. if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
  5037. setGlobalEval( getAll( elem, "script" ) );
  5038. }
  5039. elem.parentNode.removeChild( elem );
  5040. }
  5041. }
  5042. return this;
  5043. };
  5044. jQuery.prototype.removeAttr = function( name ) {
  5045. /// <summary>
  5046. /// Remove an attribute from each element in the set of matched elements.
  5047. /// </summary>
  5048. /// <param name="name" type="String">
  5049. /// An attribute to remove; as of version 1.7, it can be a space-separated list of attributes.
  5050. /// </param>
  5051. /// <returns type="jQuery" />
  5052. return this.each(function() {
  5053. jQuery.removeAttr( this, name );
  5054. });
  5055. };
  5056. jQuery.prototype.removeClass = function( value ) {
  5057. /// <summary>
  5058. /// Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
  5059. /// &#10;1 - removeClass(className)
  5060. /// &#10;2 - removeClass(function(index, class))
  5061. /// </summary>
  5062. /// <param name="value" type="String">
  5063. /// One or more space-separated classes to be removed from the class attribute of each matched element.
  5064. /// </param>
  5065. /// <returns type="jQuery" />
  5066. var classes, elem, cur, clazz, j,
  5067. i = 0,
  5068. len = this.length,
  5069. proceed = arguments.length === 0 || typeof value === "string" && value;
  5070. if ( jQuery.isFunction( value ) ) {
  5071. return this.each(function( j ) {
  5072. jQuery( this ).removeClass( value.call( this, j, this.className ) );
  5073. });
  5074. }
  5075. if ( proceed ) {
  5076. classes = ( value || "" ).match( core_rnotwhite ) || [];
  5077. for ( ; i < len; i++ ) {
  5078. elem = this[ i ];
  5079. // This expression is here for better compressibility (see addClass)
  5080. cur = elem.nodeType === 1 && ( elem.className ?
  5081. ( " " + elem.className + " " ).replace( rclass, " " ) :
  5082. ""
  5083. );
  5084. if ( cur ) {
  5085. j = 0;
  5086. while ( (clazz = classes[j++]) ) {
  5087. // Remove *all* instances
  5088. while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
  5089. cur = cur.replace( " " + clazz + " ", " " );
  5090. }
  5091. }
  5092. elem.className = value ? jQuery.trim( cur ) : "";
  5093. }
  5094. }
  5095. }
  5096. return this;
  5097. };
  5098. jQuery.prototype.removeData = function( key ) {
  5099. /// <summary>
  5100. /// Remove a previously-stored piece of data.
  5101. /// &#10;1 - removeData(name)
  5102. /// &#10;2 - removeData(list)
  5103. /// </summary>
  5104. /// <param name="key" type="String">
  5105. /// A string naming the piece of data to delete.
  5106. /// </param>
  5107. /// <returns type="jQuery" />
  5108. return this.each(function() {
  5109. jQuery.removeData( this, key );
  5110. });
  5111. };
  5112. jQuery.prototype.removeProp = function( name ) {
  5113. /// <summary>
  5114. /// Remove a property for the set of matched elements.
  5115. /// </summary>
  5116. /// <param name="name" type="String">
  5117. /// The name of the property to set.
  5118. /// </param>
  5119. /// <returns type="jQuery" />
  5120. name = jQuery.propFix[ name ] || name;
  5121. return this.each(function() {
  5122. // try/catch handles cases where IE balks (such as removing a property on window)
  5123. try {
  5124. this[ name ] = undefined;
  5125. delete this[ name ];
  5126. } catch( e ) {}
  5127. });
  5128. };
  5129. jQuery.prototype.replaceAll = function( selector ) {
  5130. /// <summary>
  5131. /// Replace each target element with the set of matched elements.
  5132. /// </summary>
  5133. /// <param name="selector" type="String">
  5134. /// A selector expression indicating which element(s) to replace.
  5135. /// </param>
  5136. /// <returns type="jQuery" />
  5137. var elems,
  5138. i = 0,
  5139. ret = [],
  5140. insert = jQuery( selector ),
  5141. last = insert.length - 1;
  5142. for ( ; i <= last; i++ ) {
  5143. elems = i === last ? this : this.clone(true);
  5144. jQuery( insert[i] )[ original ]( elems );
  5145. // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
  5146. core_push.apply( ret, elems.get() );
  5147. }
  5148. return this.pushStack( ret );
  5149. };
  5150. jQuery.prototype.replaceWith = function() {
  5151. /// <summary>
  5152. /// Replace each element in the set of matched elements with the provided new content.
  5153. /// &#10;1 - replaceWith(newContent)
  5154. /// &#10;2 - replaceWith(function)
  5155. /// </summary>
  5156. /// <param name="" type="jQuery">
  5157. /// The content to insert. May be an HTML string, DOM element, or jQuery object.
  5158. /// </param>
  5159. /// <returns type="jQuery" />
  5160. var
  5161. // Snapshot the DOM in case .domManip sweeps something relevant into its fragment
  5162. args = jQuery.map( this, function( elem ) {
  5163. return [ elem.nextSibling, elem.parentNode ];
  5164. }),
  5165. i = 0;
  5166. // Make the changes, replacing each context element with the new content
  5167. this.domManip( arguments, function( elem ) {
  5168. var next = args[ i++ ],
  5169. parent = args[ i++ ];
  5170. if ( parent ) {
  5171. // Don't use the snapshot next if it has moved (#13810)
  5172. if ( next && next.parentNode !== parent ) {
  5173. next = this.nextSibling;
  5174. }
  5175. jQuery( this ).remove();
  5176. parent.insertBefore( elem, next );
  5177. }
  5178. // Allow new content to include elements from the context set
  5179. }, true );
  5180. // Force removal if there was no new content (e.g., from empty arguments)
  5181. return i ? this : this.remove();
  5182. };
  5183. jQuery.prototype.resize = function( data, fn ) {
  5184. /// <summary>
  5185. /// Bind an event handler to the "resize" JavaScript event, or trigger that event on an element.
  5186. /// &#10;1 - resize(handler(eventObject))
  5187. /// &#10;2 - resize(eventData, handler(eventObject))
  5188. /// &#10;3 - resize()
  5189. /// </summary>
  5190. /// <param name="data" type="Object">
  5191. /// A map of data that will be passed to the event handler.
  5192. /// </param>
  5193. /// <param name="fn" type="Function">
  5194. /// A function to execute each time the event is triggered.
  5195. /// </param>
  5196. /// <returns type="jQuery" />
  5197. return arguments.length > 0 ?
  5198. this.on( name, null, data, fn ) :
  5199. this.trigger( name );
  5200. };
  5201. jQuery.prototype.scroll = function( data, fn ) {
  5202. /// <summary>
  5203. /// Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element.
  5204. /// &#10;1 - scroll(handler(eventObject))
  5205. /// &#10;2 - scroll(eventData, handler(eventObject))
  5206. /// &#10;3 - scroll()
  5207. /// </summary>
  5208. /// <param name="data" type="Object">
  5209. /// A map of data that will be passed to the event handler.
  5210. /// </param>
  5211. /// <param name="fn" type="Function">
  5212. /// A function to execute each time the event is triggered.
  5213. /// </param>
  5214. /// <returns type="jQuery" />
  5215. return arguments.length > 0 ?
  5216. this.on( name, null, data, fn ) :
  5217. this.trigger( name );
  5218. };
  5219. jQuery.prototype.scrollLeft = function( val ) {
  5220. /// <summary>
  5221. /// 1: Get the current horizontal position of the scroll bar for the first element in the set of matched elements.
  5222. /// &#10; 1.1 - scrollLeft()
  5223. /// &#10;2: Set the current horizontal position of the scroll bar for each of the set of matched elements.
  5224. /// &#10; 2.1 - scrollLeft(value)
  5225. /// </summary>
  5226. /// <param name="val" type="Number">
  5227. /// An integer indicating the new position to set the scroll bar to.
  5228. /// </param>
  5229. /// <returns type="jQuery" />
  5230. return jQuery.access( this, function( elem, method, val ) {
  5231. var win = getWindow( elem );
  5232. if ( val === undefined ) {
  5233. return win ? (prop in win) ? win[ prop ] :
  5234. win.document.documentElement[ method ] :
  5235. elem[ method ];
  5236. }
  5237. if ( win ) {
  5238. win.scrollTo(
  5239. !top ? val : jQuery( win ).scrollLeft(),
  5240. top ? val : jQuery( win ).scrollTop()
  5241. );
  5242. } else {
  5243. elem[ method ] = val;
  5244. }
  5245. }, method, val, arguments.length, null );
  5246. };
  5247. jQuery.prototype.scrollTop = function( val ) {
  5248. /// <summary>
  5249. /// 1: Get the current vertical position of the scroll bar for the first element in the set of matched elements.
  5250. /// &#10; 1.1 - scrollTop()
  5251. /// &#10;2: Set the current vertical position of the scroll bar for each of the set of matched elements.
  5252. /// &#10; 2.1 - scrollTop(value)
  5253. /// </summary>
  5254. /// <param name="val" type="Number">
  5255. /// An integer indicating the new position to set the scroll bar to.
  5256. /// </param>
  5257. /// <returns type="jQuery" />
  5258. return jQuery.access( this, function( elem, method, val ) {
  5259. var win = getWindow( elem );
  5260. if ( val === undefined ) {
  5261. return win ? (prop in win) ? win[ prop ] :
  5262. win.document.documentElement[ method ] :
  5263. elem[ method ];
  5264. }
  5265. if ( win ) {
  5266. win.scrollTo(
  5267. !top ? val : jQuery( win ).scrollLeft(),
  5268. top ? val : jQuery( win ).scrollTop()
  5269. );
  5270. } else {
  5271. elem[ method ] = val;
  5272. }
  5273. }, method, val, arguments.length, null );
  5274. };
  5275. jQuery.prototype.select = function( data, fn ) {
  5276. /// <summary>
  5277. /// Bind an event handler to the "select" JavaScript event, or trigger that event on an element.
  5278. /// &#10;1 - select(handler(eventObject))
  5279. /// &#10;2 - select(eventData, handler(eventObject))
  5280. /// &#10;3 - select()
  5281. /// </summary>
  5282. /// <param name="data" type="Object">
  5283. /// A map of data that will be passed to the event handler.
  5284. /// </param>
  5285. /// <param name="fn" type="Function">
  5286. /// A function to execute each time the event is triggered.
  5287. /// </param>
  5288. /// <returns type="jQuery" />
  5289. return arguments.length > 0 ?
  5290. this.on( name, null, data, fn ) :
  5291. this.trigger( name );
  5292. };
  5293. jQuery.prototype.serialize = function() {
  5294. /// <summary>
  5295. /// Encode a set of form elements as a string for submission.
  5296. /// </summary>
  5297. /// <returns type="String" />
  5298. return jQuery.param( this.serializeArray() );
  5299. };
  5300. jQuery.prototype.serializeArray = function() {
  5301. /// <summary>
  5302. /// Encode a set of form elements as an array of names and values.
  5303. /// </summary>
  5304. /// <returns type="Array" />
  5305. return this.map(function(){
  5306. // Can add propHook for "elements" to filter or add form elements
  5307. var elements = jQuery.prop( this, "elements" );
  5308. return elements ? jQuery.makeArray( elements ) : this;
  5309. })
  5310. .filter(function(){
  5311. var type = this.type;
  5312. // Use .is(":disabled") so that fieldset[disabled] works
  5313. return this.name && !jQuery( this ).is( ":disabled" ) &&
  5314. rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
  5315. ( this.checked || !manipulation_rcheckableType.test( type ) );
  5316. })
  5317. .map(function( i, elem ){
  5318. var val = jQuery( this ).val();
  5319. return val == null ?
  5320. null :
  5321. jQuery.isArray( val ) ?
  5322. jQuery.map( val, function( val ){
  5323. return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
  5324. }) :
  5325. { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
  5326. }).get();
  5327. };
  5328. jQuery.prototype.show = function( speed, easing, callback ) {
  5329. /// <summary>
  5330. /// Display the matched elements.
  5331. /// &#10;1 - show()
  5332. /// &#10;2 - show(duration, callback)
  5333. /// &#10;3 - show(duration, easing, callback)
  5334. /// </summary>
  5335. /// <param name="speed" type="Number">
  5336. /// A string or number determining how long the animation will run.
  5337. /// </param>
  5338. /// <param name="easing" type="String">
  5339. /// A string indicating which easing function to use for the transition.
  5340. /// </param>
  5341. /// <param name="callback" type="Function">
  5342. /// A function to call once the animation is complete.
  5343. /// </param>
  5344. /// <returns type="jQuery" />
  5345. return speed == null || typeof speed === "boolean" ?
  5346. cssFn.apply( this, arguments ) :
  5347. this.animate( genFx( name, true ), speed, easing, callback );
  5348. };
  5349. jQuery.prototype.siblings = function( until, selector ) {
  5350. /// <summary>
  5351. /// Get the siblings of each element in the set of matched elements, optionally filtered by a selector.
  5352. /// </summary>
  5353. /// <param name="until" type="String">
  5354. /// A string containing a selector expression to match elements against.
  5355. /// </param>
  5356. /// <returns type="jQuery" />
  5357. var ret = jQuery.map( this, fn, until );
  5358. if ( name.slice( -5 ) !== "Until" ) {
  5359. selector = until;
  5360. }
  5361. if ( selector && typeof selector === "string" ) {
  5362. ret = jQuery.filter( selector, ret );
  5363. }
  5364. if ( this.length > 1 ) {
  5365. // Remove duplicates
  5366. if ( !guaranteedUnique[ name ] ) {
  5367. ret = jQuery.unique( ret );
  5368. }
  5369. // Reverse order for parents* and prev-derivatives
  5370. if ( rparentsprev.test( name ) ) {
  5371. ret = ret.reverse();
  5372. }
  5373. }
  5374. return this.pushStack( ret );
  5375. };
  5376. jQuery.prototype.size = function() {
  5377. /// <summary>
  5378. /// Return the number of elements in the jQuery object.
  5379. /// </summary>
  5380. /// <returns type="Number" />
  5381. return this.length;
  5382. };
  5383. jQuery.prototype.slice = function() {
  5384. /// <summary>
  5385. /// Reduce the set of matched elements to a subset specified by a range of indices.
  5386. /// </summary>
  5387. /// <param name="" type="Number">
  5388. /// An integer indicating the 0-based position at which the elements begin to be selected. If negative, it indicates an offset from the end of the set.
  5389. /// </param>
  5390. /// <param name="" type="Number">
  5391. /// An integer indicating the 0-based position at which the elements stop being selected. If negative, it indicates an offset from the end of the set. If omitted, the range continues until the end of the set.
  5392. /// </param>
  5393. /// <returns type="jQuery" />
  5394. return this.pushStack( core_slice.apply( this, arguments ) );
  5395. };
  5396. jQuery.prototype.slideDown = function( speed, easing, callback ) {
  5397. /// <summary>
  5398. /// Display the matched elements with a sliding motion.
  5399. /// &#10;1 - slideDown(duration, callback)
  5400. /// &#10;2 - slideDown(duration, easing, callback)
  5401. /// </summary>
  5402. /// <param name="speed" type="Number">
  5403. /// A string or number determining how long the animation will run.
  5404. /// </param>
  5405. /// <param name="easing" type="String">
  5406. /// A string indicating which easing function to use for the transition.
  5407. /// </param>
  5408. /// <param name="callback" type="Function">
  5409. /// A function to call once the animation is complete.
  5410. /// </param>
  5411. /// <returns type="jQuery" />
  5412. return this.animate( props, speed, easing, callback );
  5413. };
  5414. jQuery.prototype.slideToggle = function( speed, easing, callback ) {
  5415. /// <summary>
  5416. /// Display or hide the matched elements with a sliding motion.
  5417. /// &#10;1 - slideToggle(duration, callback)
  5418. /// &#10;2 - slideToggle(duration, easing, callback)
  5419. /// </summary>
  5420. /// <param name="speed" type="Number">
  5421. /// A string or number determining how long the animation will run.
  5422. /// </param>
  5423. /// <param name="easing" type="String">
  5424. /// A string indicating which easing function to use for the transition.
  5425. /// </param>
  5426. /// <param name="callback" type="Function">
  5427. /// A function to call once the animation is complete.
  5428. /// </param>
  5429. /// <returns type="jQuery" />
  5430. return this.animate( props, speed, easing, callback );
  5431. };
  5432. jQuery.prototype.slideUp = function( speed, easing, callback ) {
  5433. /// <summary>
  5434. /// Hide the matched elements with a sliding motion.
  5435. /// &#10;1 - slideUp(duration, callback)
  5436. /// &#10;2 - slideUp(duration, easing, callback)
  5437. /// </summary>
  5438. /// <param name="speed" type="Number">
  5439. /// A string or number determining how long the animation will run.
  5440. /// </param>
  5441. /// <param name="easing" type="String">
  5442. /// A string indicating which easing function to use for the transition.
  5443. /// </param>
  5444. /// <param name="callback" type="Function">
  5445. /// A function to call once the animation is complete.
  5446. /// </param>
  5447. /// <returns type="jQuery" />
  5448. return this.animate( props, speed, easing, callback );
  5449. };
  5450. jQuery.prototype.stop = function( type, clearQueue, gotoEnd ) {
  5451. /// <summary>
  5452. /// Stop the currently-running animation on the matched elements.
  5453. /// &#10;1 - stop(clearQueue, jumpToEnd)
  5454. /// &#10;2 - stop(queue, clearQueue, jumpToEnd)
  5455. /// </summary>
  5456. /// <param name="type" type="String">
  5457. /// The name of the queue in which to stop animations.
  5458. /// </param>
  5459. /// <param name="clearQueue" type="Boolean">
  5460. /// A Boolean indicating whether to remove queued animation as well. Defaults to false.
  5461. /// </param>
  5462. /// <param name="gotoEnd" type="Boolean">
  5463. /// A Boolean indicating whether to complete the current animation immediately. Defaults to false.
  5464. /// </param>
  5465. /// <returns type="jQuery" />
  5466. var stopQueue = function( hooks ) {
  5467. var stop = hooks.stop;
  5468. delete hooks.stop;
  5469. stop( gotoEnd );
  5470. };
  5471. if ( typeof type !== "string" ) {
  5472. gotoEnd = clearQueue;
  5473. clearQueue = type;
  5474. type = undefined;
  5475. }
  5476. if ( clearQueue && type !== false ) {
  5477. this.queue( type || "fx", [] );
  5478. }
  5479. return this.each(function() {
  5480. var dequeue = true,
  5481. index = type != null && type + "queueHooks",
  5482. timers = jQuery.timers,
  5483. data = jQuery._data( this );
  5484. if ( index ) {
  5485. if ( data[ index ] && data[ index ].stop ) {
  5486. stopQueue( data[ index ] );
  5487. }
  5488. } else {
  5489. for ( index in data ) {
  5490. if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
  5491. stopQueue( data[ index ] );
  5492. }
  5493. }
  5494. }
  5495. for ( index = timers.length; index--; ) {
  5496. if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
  5497. timers[ index ].anim.stop( gotoEnd );
  5498. dequeue = false;
  5499. timers.splice( index, 1 );
  5500. }
  5501. }
  5502. // start the next in the queue if the last step wasn't forced
  5503. // timers currently will call their complete callbacks, which will dequeue
  5504. // but only if they were gotoEnd
  5505. if ( dequeue || !gotoEnd ) {
  5506. jQuery.dequeue( this, type );
  5507. }
  5508. });
  5509. };
  5510. jQuery.prototype.submit = function( data, fn ) {
  5511. /// <summary>
  5512. /// Bind an event handler to the "submit" JavaScript event, or trigger that event on an element.
  5513. /// &#10;1 - submit(handler(eventObject))
  5514. /// &#10;2 - submit(eventData, handler(eventObject))
  5515. /// &#10;3 - submit()
  5516. /// </summary>
  5517. /// <param name="data" type="Object">
  5518. /// A map of data that will be passed to the event handler.
  5519. /// </param>
  5520. /// <param name="fn" type="Function">
  5521. /// A function to execute each time the event is triggered.
  5522. /// </param>
  5523. /// <returns type="jQuery" />
  5524. return arguments.length > 0 ?
  5525. this.on( name, null, data, fn ) :
  5526. this.trigger( name );
  5527. };
  5528. jQuery.prototype.text = function( value ) {
  5529. /// <summary>
  5530. /// 1: Get the combined text contents of each element in the set of matched elements, including their descendants.
  5531. /// &#10; 1.1 - text()
  5532. /// &#10;2: Set the content of each element in the set of matched elements to the specified text.
  5533. /// &#10; 2.1 - text(textString)
  5534. /// &#10; 2.2 - text(function(index, text))
  5535. /// </summary>
  5536. /// <param name="value" type="String">
  5537. /// A string of text to set as the content of each matched element.
  5538. /// </param>
  5539. /// <returns type="jQuery" />
  5540. return jQuery.access( this, function( value ) {
  5541. return value === undefined ?
  5542. jQuery.text( this ) :
  5543. this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
  5544. }, null, value, arguments.length );
  5545. };
  5546. jQuery.prototype.toArray = function() {
  5547. /// <summary>
  5548. /// Retrieve all the DOM elements contained in the jQuery set, as an array.
  5549. /// </summary>
  5550. /// <returns type="Array" />
  5551. return core_slice.call( this );
  5552. };
  5553. jQuery.prototype.toggle = function( speed, easing, callback ) {
  5554. /// <summary>
  5555. /// 1: Bind two or more handlers to the matched elements, to be executed on alternate clicks.
  5556. /// &#10; 1.1 - toggle(handler(eventObject), handler(eventObject), handler(eventObject))
  5557. /// &#10;2: Display or hide the matched elements.
  5558. /// &#10; 2.1 - toggle(duration, callback)
  5559. /// &#10; 2.2 - toggle(duration, easing, callback)
  5560. /// &#10; 2.3 - toggle(showOrHide)
  5561. /// </summary>
  5562. /// <param name="speed" type="Function">
  5563. /// A function to execute every even time the element is clicked.
  5564. /// </param>
  5565. /// <param name="easing" type="Function">
  5566. /// A function to execute every odd time the element is clicked.
  5567. /// </param>
  5568. /// <param name="callback" type="Function">
  5569. /// Additional handlers to cycle through after clicks.
  5570. /// </param>
  5571. /// <returns type="jQuery" />
  5572. return speed == null || typeof speed === "boolean" ?
  5573. cssFn.apply( this, arguments ) :
  5574. this.animate( genFx( name, true ), speed, easing, callback );
  5575. };
  5576. jQuery.prototype.toggleClass = function( value, stateVal ) {
  5577. /// <summary>
  5578. /// Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.
  5579. /// &#10;1 - toggleClass(className)
  5580. /// &#10;2 - toggleClass(className, switch)
  5581. /// &#10;3 - toggleClass(switch)
  5582. /// &#10;4 - toggleClass(function(index, class, switch), switch)
  5583. /// </summary>
  5584. /// <param name="value" type="String">
  5585. /// One or more class names (separated by spaces) to be toggled for each element in the matched set.
  5586. /// </param>
  5587. /// <param name="stateVal" type="Boolean">
  5588. /// A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed.
  5589. /// </param>
  5590. /// <returns type="jQuery" />
  5591. var type = typeof value,
  5592. isBool = typeof stateVal === "boolean";
  5593. if ( jQuery.isFunction( value ) ) {
  5594. return this.each(function( i ) {
  5595. jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
  5596. });
  5597. }
  5598. return this.each(function() {
  5599. if ( type === "string" ) {
  5600. // toggle individual class names
  5601. var className,
  5602. i = 0,
  5603. self = jQuery( this ),
  5604. state = stateVal,
  5605. classNames = value.match( core_rnotwhite ) || [];
  5606. while ( (className = classNames[ i++ ]) ) {
  5607. // check each className given, space separated list
  5608. state = isBool ? state : !self.hasClass( className );
  5609. self[ state ? "addClass" : "removeClass" ]( className );
  5610. }
  5611. // Toggle whole class name
  5612. } else if ( type === core_strundefined || type === "boolean" ) {
  5613. if ( this.className ) {
  5614. // store className if set
  5615. jQuery._data( this, "__className__", this.className );
  5616. }
  5617. // If the element has a class name or if we're passed "false",
  5618. // then remove the whole classname (if there was one, the above saved it).
  5619. // Otherwise bring back whatever was previously saved (if anything),
  5620. // falling back to the empty string if nothing was stored.
  5621. this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
  5622. }
  5623. });
  5624. };
  5625. jQuery.prototype.trigger = function( type, data ) {
  5626. /// <summary>
  5627. /// Execute all handlers and behaviors attached to the matched elements for the given event type.
  5628. /// &#10;1 - trigger(eventType, extraParameters)
  5629. /// &#10;2 - trigger(event)
  5630. /// </summary>
  5631. /// <param name="type" type="String">
  5632. /// A string containing a JavaScript event type, such as click or submit.
  5633. /// </param>
  5634. /// <param name="data" type="Object">
  5635. /// Additional parameters to pass along to the event handler.
  5636. /// </param>
  5637. /// <returns type="jQuery" />
  5638. return this.each(function() {
  5639. jQuery.event.trigger( type, data, this );
  5640. });
  5641. };
  5642. jQuery.prototype.triggerHandler = function( type, data ) {
  5643. /// <summary>
  5644. /// Execute all handlers attached to an element for an event.
  5645. /// </summary>
  5646. /// <param name="type" type="String">
  5647. /// A string containing a JavaScript event type, such as click or submit.
  5648. /// </param>
  5649. /// <param name="data" type="Array">
  5650. /// An array of additional parameters to pass along to the event handler.
  5651. /// </param>
  5652. /// <returns type="Object" />
  5653. var elem = this[0];
  5654. if ( elem ) {
  5655. return jQuery.event.trigger( type, data, elem, true );
  5656. }
  5657. };
  5658. jQuery.prototype.unbind = function( types, fn ) {
  5659. /// <summary>
  5660. /// Remove a previously-attached event handler from the elements.
  5661. /// &#10;1 - unbind(eventType, handler(eventObject))
  5662. /// &#10;2 - unbind(eventType, false)
  5663. /// &#10;3 - unbind(event)
  5664. /// </summary>
  5665. /// <param name="types" type="String">
  5666. /// A string containing a JavaScript event type, such as click or submit.
  5667. /// </param>
  5668. /// <param name="fn" type="Function">
  5669. /// The function that is to be no longer executed.
  5670. /// </param>
  5671. /// <returns type="jQuery" />
  5672. return this.off( types, null, fn );
  5673. };
  5674. jQuery.prototype.undelegate = function( selector, types, fn ) {
  5675. /// <summary>
  5676. /// Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
  5677. /// &#10;1 - undelegate()
  5678. /// &#10;2 - undelegate(selector, eventType)
  5679. /// &#10;3 - undelegate(selector, eventType, handler(eventObject))
  5680. /// &#10;4 - undelegate(selector, events)
  5681. /// &#10;5 - undelegate(namespace)
  5682. /// </summary>
  5683. /// <param name="selector" type="String">
  5684. /// A selector which will be used to filter the event results.
  5685. /// </param>
  5686. /// <param name="types" type="String">
  5687. /// A string containing a JavaScript event type, such as "click" or "keydown"
  5688. /// </param>
  5689. /// <param name="fn" type="Function">
  5690. /// A function to execute at the time the event is triggered.
  5691. /// </param>
  5692. /// <returns type="jQuery" />
  5693. // ( namespace ) or ( selector, types [, fn] )
  5694. return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
  5695. };
  5696. jQuery.prototype.unload = function( data, fn ) {
  5697. /// <summary>
  5698. /// Bind an event handler to the "unload" JavaScript event.
  5699. /// &#10;1 - unload(handler(eventObject))
  5700. /// &#10;2 - unload(eventData, handler(eventObject))
  5701. /// </summary>
  5702. /// <param name="data" type="Object">
  5703. /// A map of data that will be passed to the event handler.
  5704. /// </param>
  5705. /// <param name="fn" type="Function">
  5706. /// A function to execute each time the event is triggered.
  5707. /// </param>
  5708. /// <returns type="jQuery" />
  5709. return arguments.length > 0 ?
  5710. this.on( name, null, data, fn ) :
  5711. this.trigger( name );
  5712. };
  5713. jQuery.prototype.unwrap = function() {
  5714. /// <summary>
  5715. /// Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
  5716. /// </summary>
  5717. /// <returns type="jQuery" />
  5718. return this.parent().each(function() {
  5719. if ( !jQuery.nodeName( this, "body" ) ) {
  5720. jQuery( this ).replaceWith( this.childNodes );
  5721. }
  5722. }).end();
  5723. };
  5724. jQuery.prototype.val = function( value ) {
  5725. /// <summary>
  5726. /// 1: Get the current value of the first element in the set of matched elements.
  5727. /// &#10; 1.1 - val()
  5728. /// &#10;2: Set the value of each element in the set of matched elements.
  5729. /// &#10; 2.1 - val(value)
  5730. /// &#10; 2.2 - val(function(index, value))
  5731. /// </summary>
  5732. /// <param name="value" type="String">
  5733. /// A string of text or an array of strings corresponding to the value of each matched element to set as selected/checked.
  5734. /// </param>
  5735. /// <returns type="jQuery" />
  5736. var ret, hooks, isFunction,
  5737. elem = this[0];
  5738. if ( !arguments.length ) {
  5739. if ( elem ) {
  5740. hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
  5741. if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
  5742. return ret;
  5743. }
  5744. ret = elem.value;
  5745. return typeof ret === "string" ?
  5746. // handle most common string cases
  5747. ret.replace(rreturn, "") :
  5748. // handle cases where value is null/undef or number
  5749. ret == null ? "" : ret;
  5750. }
  5751. return;
  5752. }
  5753. isFunction = jQuery.isFunction( value );
  5754. return this.each(function( i ) {
  5755. var val;
  5756. if ( this.nodeType !== 1 ) {
  5757. return;
  5758. }
  5759. if ( isFunction ) {
  5760. val = value.call( this, i, jQuery( this ).val() );
  5761. } else {
  5762. val = value;
  5763. }
  5764. // Treat null/undefined as ""; convert numbers to string
  5765. if ( val == null ) {
  5766. val = "";
  5767. } else if ( typeof val === "number" ) {
  5768. val += "";
  5769. } else if ( jQuery.isArray( val ) ) {
  5770. val = jQuery.map(val, function ( value ) {
  5771. return value == null ? "" : value + "";
  5772. });
  5773. }
  5774. hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
  5775. // If set returns undefined, fall back to normal setting
  5776. if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
  5777. this.value = val;
  5778. }
  5779. });
  5780. };
  5781. jQuery.prototype.width = function( margin, value ) {
  5782. /// <summary>
  5783. /// 1: Get the current computed width for the first element in the set of matched elements.
  5784. /// &#10; 1.1 - width()
  5785. /// &#10;2: Set the CSS width of each element in the set of matched elements.
  5786. /// &#10; 2.1 - width(value)
  5787. /// &#10; 2.2 - width(function(index, width))
  5788. /// </summary>
  5789. /// <param name="margin" type="Number">
  5790. /// An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
  5791. /// </param>
  5792. /// <returns type="jQuery" />
  5793. var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
  5794. extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
  5795. return jQuery.access( this, function( elem, type, value ) {
  5796. var doc;
  5797. if ( jQuery.isWindow( elem ) ) {
  5798. // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
  5799. // isn't a whole lot we can do. See pull request at this URL for discussion:
  5800. // https://github.com/jquery/jquery/pull/764
  5801. return elem.document.documentElement[ "client" + name ];
  5802. }
  5803. // Get document width or height
  5804. if ( elem.nodeType === 9 ) {
  5805. doc = elem.documentElement;
  5806. // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
  5807. // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
  5808. return Math.max(
  5809. elem.body[ "scroll" + name ], doc[ "scroll" + name ],
  5810. elem.body[ "offset" + name ], doc[ "offset" + name ],
  5811. doc[ "client" + name ]
  5812. );
  5813. }
  5814. return value === undefined ?
  5815. // Get width or height on the element, requesting but not forcing parseFloat
  5816. jQuery.css( elem, type, extra ) :
  5817. // Set width or height on the element
  5818. jQuery.style( elem, type, value, extra );
  5819. }, type, chainable ? margin : undefined, chainable, null );
  5820. };
  5821. jQuery.prototype.wrap = function( html ) {
  5822. /// <summary>
  5823. /// Wrap an HTML structure around each element in the set of matched elements.
  5824. /// &#10;1 - wrap(wrappingElement)
  5825. /// &#10;2 - wrap(function(index))
  5826. /// </summary>
  5827. /// <param name="html" type="jQuery">
  5828. /// An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the matched elements.
  5829. /// </param>
  5830. /// <returns type="jQuery" />
  5831. var isFunction = jQuery.isFunction( html );
  5832. return this.each(function(i) {
  5833. jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
  5834. });
  5835. };
  5836. jQuery.prototype.wrapAll = function( html ) {
  5837. /// <summary>
  5838. /// Wrap an HTML structure around all elements in the set of matched elements.
  5839. /// </summary>
  5840. /// <param name="html" type="jQuery">
  5841. /// An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the matched elements.
  5842. /// </param>
  5843. /// <returns type="jQuery" />
  5844. if ( jQuery.isFunction( html ) ) {
  5845. return this.each(function(i) {
  5846. jQuery(this).wrapAll( html.call(this, i) );
  5847. });
  5848. }
  5849. if ( this[0] ) {
  5850. // The elements to wrap the target around
  5851. var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
  5852. if ( this[0].parentNode ) {
  5853. wrap.insertBefore( this[0] );
  5854. }
  5855. wrap.map(function() {
  5856. var elem = this;
  5857. while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
  5858. elem = elem.firstChild;
  5859. }
  5860. return elem;
  5861. }).append( this );
  5862. }
  5863. return this;
  5864. };
  5865. jQuery.prototype.wrapInner = function( html ) {
  5866. /// <summary>
  5867. /// Wrap an HTML structure around the content of each element in the set of matched elements.
  5868. /// &#10;1 - wrapInner(wrappingElement)
  5869. /// &#10;2 - wrapInner(function(index))
  5870. /// </summary>
  5871. /// <param name="html" type="String">
  5872. /// An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements.
  5873. /// </param>
  5874. /// <returns type="jQuery" />
  5875. if ( jQuery.isFunction( html ) ) {
  5876. return this.each(function(i) {
  5877. jQuery(this).wrapInner( html.call(this, i) );
  5878. });
  5879. }
  5880. return this.each(function() {
  5881. var self = jQuery( this ),
  5882. contents = self.contents();
  5883. if ( contents.length ) {
  5884. contents.wrapAll( html );
  5885. } else {
  5886. self.append( html );
  5887. }
  5888. });
  5889. };
  5890. jQuery.fn = jQuery.prototype;
  5891. jQuery.fn.init.prototype = jQuery.fn;
  5892. window.jQuery = window.$ = jQuery;
  5893. })(window);