2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 // Type definitions for jQuery 1.10.x / 2.0.x
21 // Project: http://jquery.com/
22 // Definitions by: Boris Yankov <https://github.com/borisyankov/>, Christian Hoffmeister <https://github.com/choffmeister>, Steve Fenton <https://github.com/Steve-Fenton>, Diullei Gomes <https://github.com/Diullei>, Tass Iliopoulos <https://github.com/tasoili>, Jason Swearingen <https://github.com/jasons-novaleaf>, Sean Hill <https://github.com/seanski>, Guus Goossens <https://github.com/Guuz>, Kelly Summerlin <https://github.com/ksummerlin>, Basarat Ali Syed <https://github.com/basarat>, Nicholas Wolverson <https://github.com/nwolverson>, Derek Cicerone <https://github.com/derekcicerone>, Andrew Gaspar <https://github.com/AndrewGaspar>, James Harrison Fisher <https://github.com/jameshfisher>, Seikichi Kondo <https://github.com/seikichi>, Benjamin Jackman <https://github.com/benjaminjackman>, Poul Sorensen <https://github.com/s093294>, Josh Strobl <https://github.com/JoshStrobl>, John Reilly <https://github.com/johnnyreilly/>, Dick van den Brink <https://github.com/DickvdBrink>
23 // Definitions: https://github.com/borisyankov/DefinitelyTyped
25 /* *****************************************************************************
26 Copyright (c) Microsoft Corporation. All rights reserved.
27 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
28 this file except in compliance with the License. You may obtain a copy of the
29 License at http://www.apache.org/licenses/LICENSE-2.0
31 THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
32 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
33 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
34 MERCHANTABLITY OR NON-INFRINGEMENT.
36 See the Apache Version 2.0 License for specific language governing permissions
37 and limitations under the License.
38 ***************************************************************************** */
42 * Interface for the AJAX setting that will configure the AJAX request
44 interface JQueryAjaxSettings {
46 * The content type sent in the request header that tells the server what kind of response it will accept in return. If the accepts setting needs modification, it is recommended to do so once in the $.ajaxSetup() method.
50 * By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. As of jQuery 1.8, the use of async: false with jqXHR ($.Deferred) is deprecated; you must use the success/error/complete callback options instead of the corresponding methods of the jqXHR object such as jqXHR.done() or the deprecated jqXHR.success().
54 * A pre-request callback function that can be used to modify the jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object before it is sent. Use this to set custom headers, etc. The jqXHR and settings objects are passed as arguments. This is an Ajax Event. Returning false in the beforeSend function will cancel the request. As of jQuery 1.5, the beforeSend option will be called regardless of the type of request.
56 beforeSend? (jqXHR: JQueryXHR, settings: JQueryAjaxSettings): any;
58 * If set to false, it will force requested pages not to be cached by the browser. Note: Setting cache to false will only work correctly with HEAD and GET requests. It works by appending "_={timestamp}" to the GET parameters. The parameter is not needed for other types of requests, except in IE8 when a POST is made to a URL that has already been requested by a GET.
62 * A function to be called when the request finishes (after success and error callbacks are executed). The function gets passed two arguments: The jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object and a string categorizing the status of the request ("success", "notmodified", "error", "timeout", "abort", or "parsererror"). As of jQuery 1.5, the complete setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event.
64 complete? (jqXHR: JQueryXHR, textStatus: string): any;
66 * An object of string/regular-expression pairs that determine how jQuery will parse the response, given its content type. (version added: 1.5)
68 contents?: { [key: string]: any; };
69 //According to jQuery.ajax source code, ajax's option actually allows contentType to set to "false"
70 // https://github.com/borisyankov/DefinitelyTyped/issues/742
72 * When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to $.ajax(), then it is always sent to the server (even if no data is sent). The W3C XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset will not force the browser to change the encoding.
76 * This object will be made the context of all Ajax-related callbacks. By default, the context is an object that represents the ajax settings used in the call ($.ajaxSettings merged with the settings passed to $.ajax).
80 * An object containing dataType-to-dataType converters. Each converter's value is a function that returns the transformed value of the response. (version added: 1.5)
82 converters?: { [key: string]: any; };
84 * If you wish to force a crossDomain request (such as JSONP) on the same domain, set the value of crossDomain to true. This allows, for example, server-side redirection to another domain. (version added: 1.5)
86 crossDomain?: boolean;
88 * Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See processData option to prevent this automatic processing. Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same key based on the value of the traditional setting (described below).
92 * A function to be used to handle the raw response data of XMLHttpRequest.This is a pre-filtering function to sanitize the response. You should return the sanitized data. The function accepts two arguments: The raw data returned from the server and the 'dataType' parameter.
94 dataFilter? (data: any, ty: any): any;
96 * The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string).
100 * A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides null) are "timeout", "error", "abort", and "parsererror". When an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." As of jQuery 1.5, the error setting can accept an array of functions. Each function will be called in turn. Note: This handler is not called for cross-domain script and cross-domain JSONP requests. This is an Ajax Event.
102 error? (jqXHR: JQueryXHR, textStatus: string, errorThrown: string): any;
104 * Whether to trigger global Ajax event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered. This can be used to control various Ajax Events.
108 * An object of additional header key/value pairs to send along with requests using the XMLHttpRequest transport. The header X-Requested-With: XMLHttpRequest is always added, but its default XMLHttpRequest value can be changed here. Values in the headers setting can also be overwritten from within the beforeSend function. (version added: 1.5)
110 headers?: { [key: string]: any; };
112 * Allow the request to be successful only if the response has changed since the last request. This is done by checking the Last-Modified header. Default value is false, ignoring the header. In jQuery 1.4 this technique also checks the 'etag' specified by the server to catch unmodified data.
114 ifModified?: boolean;
116 * Allow the current environment to be recognized as "local," (e.g. the filesystem), even if jQuery does not recognize it as such by default. The following protocols are currently recognized as local: file, *-extension, and widget. If the isLocal setting needs modification, it is recommended to do so once in the $.ajaxSetup() method. (version added: 1.5.1)
120 * Override the callback function name in a jsonp request. This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, { jsonp: false, jsonpCallback: "callbackName" }
124 * Specify the callback function name for a JSONP request. This value will be used instead of the random name automatically generated by jQuery. It is preferable to let jQuery generate a unique name as it'll make it easier to manage the requests and provide callbacks and error handling. You may want to specify the callback when you want to enable better browser caching of GET requests. As of jQuery 1.5, you can also use a function for this setting, in which case the value of jsonpCallback is set to the return value of that function.
128 * A mime type to override the XHR mime type. (version added: 1.5.1)
132 * A password to be used with XMLHttpRequest in response to an HTTP access authentication request.
136 * By default, data passed in to the data option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type "application/x-www-form-urlencoded". If you want to send a DOMDocument, or other non-processed data, set this option to false.
138 processData?: boolean;
140 * Only applies when the "script" transport is used (e.g., cross-domain requests with "jsonp" or "script" dataType and "GET" type). Sets the charset attribute on the script tag used in the request. Used when the character set on the local page is not the same as the one on the remote script.
142 scriptCharset?: string;
144 * An object of numeric HTTP codes and functions to be called when the response has the corresponding code. f the request is successful, the status code functions take the same parameters as the success callback; if it results in an error (including 3xx redirect), they take the same parameters as the error callback. (version added: 1.5)
146 statusCode?: { [key: string]: any; };
148 * A function to be called if the request succeeds. The function gets passed three arguments: The data returned from the server, formatted according to the dataType parameter; a string describing the status; and the jqXHR (in jQuery 1.4.x, XMLHttpRequest) object. As of jQuery 1.5, the success setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event.
150 success? (data: any, textStatus: string, jqXHR: JQueryXHR): any;
152 * Set a timeout (in milliseconds) for the request. This will override any global timeout set with $.ajaxSetup(). The timeout period starts at the point the $.ajax call is made; if several other requests are in progress and the browser has no connections available, it is possible for a request to time out before it can be sent. In jQuery 1.4.x and below, the XMLHttpRequest object will be in an invalid state if the request times out; accessing any object members may throw an exception. In Firefox 3.0+ only, script and JSONP requests cannot be cancelled by a timeout; the script will run even if it arrives after the timeout period.
156 * Set this to true if you wish to use the traditional style of param serialization.
158 traditional?: boolean;
160 * The type of request to make ("POST" or "GET"), default is "GET". Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers.
164 * A string containing the URL to which the request is sent.
168 * A username to be used with XMLHttpRequest in response to an HTTP access authentication request.
172 * Callback for creating the XMLHttpRequest object. Defaults to the ActiveXObject when available (IE), the XMLHttpRequest otherwise. Override to provide your own implementation for XMLHttpRequest or enhancements to the factory.
176 * An object of fieldName-fieldValue pairs to set on the native XHR object. For example, you can use it to set withCredentials to true for cross-domain requests if needed. In jQuery 1.5, the withCredentials property was not propagated to the native XHR and thus CORS requests requiring it would ignore this flag. For this reason, we recommend using jQuery 1.5.1+ should you require the use of it. (version added: 1.5.1)
178 xhrFields?: { [key: string]: any; };
182 * Interface for the jqXHR object
184 interface JQueryXHR extends XMLHttpRequest, JQueryPromise<any> {
186 * The .overrideMimeType() method may be used in the beforeSend() callback function, for example, to modify the response content-type header. As of jQuery 1.5.1, the jqXHR object also contains the overrideMimeType() method (it was available in jQuery 1.4.x, as well, but was temporarily removed in jQuery 1.5).
188 overrideMimeType(mimeType: string): any;
190 * Cancel the request.
192 * @param statusText A string passed as the textStatus parameter for the done callback. Default value: "canceled"
194 abort(statusText?: string): void;
196 * Incorporates the functionality of the .done() and .fail() methods, allowing (as of jQuery 1.8) the underlying Promise to be manipulated. Refer to deferred.then() for implementation details.
198 then(doneCallback: (data: any, textStatus: string, jqXHR: JQueryXHR) => void, failCallback?: (jqXHR: JQueryXHR, textStatus: string, errorThrown: any) => void): JQueryPromise<any>;
200 * Property containing the parsed response if the response Content-Type is json
206 * Interface for the JQuery callback
208 interface JQueryCallback {
210 * Add a callback or a collection of callbacks to a callback list.
212 * @param callbacks A function, or array of functions, that are to be added to the callback list.
214 add(callbacks: Function): JQueryCallback;
216 * Add a callback or a collection of callbacks to a callback list.
218 * @param callbacks A function, or array of functions, that are to be added to the callback list.
220 add(callbacks: Function[]): JQueryCallback;
223 * Disable a callback list from doing anything more.
225 disable(): JQueryCallback;
228 * Determine if the callbacks list has been disabled.
233 * Remove all of the callbacks from a list.
235 empty(): JQueryCallback;
238 * Call all of the callbacks with the given arguments
240 * @param arguments The argument or list of arguments to pass back to the callback list.
242 fire(...arguments: any[]): JQueryCallback;
245 * Determine if the callbacks have already been called at least once.
250 * Call all callbacks in a list with the given context and arguments.
252 * @param context A reference to the context in which the callbacks in the list should be fired.
253 * @param arguments An argument, or array of arguments, to pass to the callbacks in the list.
255 fireWith(context?: any, ...args: any[]): JQueryCallback;
258 * Determine whether a supplied callback is in a list
260 * @param callback The callback to search for.
262 has(callback: Function): boolean;
265 * Lock a callback list in its current state.
267 lock(): JQueryCallback;
270 * Determine if the callbacks list has been locked.
275 * Remove a callback or a collection of callbacks from a callback list.
277 * @param callbacks A function, or array of functions, that are to be removed from the callback list.
279 remove(callbacks: Function): JQueryCallback;
281 * Remove a callback or a collection of callbacks from a callback list.
283 * @param callbacks A function, or array of functions, that are to be removed from the callback list.
285 remove(callbacks: Function[]): JQueryCallback;
289 * Allows jQuery Promises to interop with non-jQuery promises
291 interface JQueryGenericPromise<T> {
293 * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
295 * @param doneFilter A function that is called when the Deferred is resolved.
296 * @param failFilter An optional function that is called when the Deferred is rejected.
298 then<U>(doneFilter: (value?: T, ...values: any[]) => U|JQueryPromise<U>, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise<U>;
301 * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
303 * @param doneFilter A function that is called when the Deferred is resolved.
304 * @param failFilter An optional function that is called when the Deferred is rejected.
306 then(doneFilter: (value?: T, ...values: any[]) => void, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise<void>;
310 * Interface for the JQuery promise/deferred callbacks
312 interface JQueryPromiseCallback<T> {
313 (value?: T, ...args: any[]): void;
316 interface JQueryPromiseOperator<T, U> {
317 (callback1: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...callbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<U>;
321 * Interface for the JQuery promise, part of callbacks
323 interface JQueryPromise<T> extends JQueryGenericPromise<T> {
325 * Determine the current state of a Deferred object.
329 * Add handlers to be called when the Deferred object is either resolved or rejected.
331 * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected.
332 * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected.
334 always(alwaysCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...alwaysCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<T>;
336 * Add handlers to be called when the Deferred object is resolved.
338 * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved.
339 * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved.
341 done(doneCallback1?: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...doneCallbackN: Array<JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[]>): JQueryPromise<T>;
343 * Add handlers to be called when the Deferred object is rejected.
345 * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected.
346 * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected.
348 fail(failCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...failCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<T>;
350 * Add handlers to be called when the Deferred object generates progress notifications.
352 * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications.
354 progress(progressCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...progressCallbackN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<T>;
356 // Deprecated - given no typings
357 pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise<any>;
361 * Interface for the JQuery deferred, part of callbacks
363 interface JQueryDeferred<T> extends JQueryGenericPromise<T> {
365 * Determine the current state of a Deferred object.
369 * Add handlers to be called when the Deferred object is either resolved or rejected.
371 * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected.
372 * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected.
374 always(alwaysCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...alwaysCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryDeferred<T>;
376 * Add handlers to be called when the Deferred object is resolved.
378 * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved.
379 * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved.
381 done(doneCallback1?: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...doneCallbackN: Array<JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[]>): JQueryDeferred<T>;
383 * Add handlers to be called when the Deferred object is rejected.
385 * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected.
386 * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected.
388 fail(failCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...failCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryDeferred<T>;
390 * Add handlers to be called when the Deferred object generates progress notifications.
392 * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications.
394 progress(progressCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...progressCallbackN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryDeferred<T>;
397 * Call the progressCallbacks on a Deferred object with the given args.
399 * @param args Optional arguments that are passed to the progressCallbacks.
401 notify(value?: any, ...args: any[]): JQueryDeferred<T>;
404 * Call the progressCallbacks on a Deferred object with the given context and args.
406 * @param context Context passed to the progressCallbacks as the this object.
407 * @param args Optional arguments that are passed to the progressCallbacks.
409 notifyWith(context: any, value?: any, ...args: any[]): JQueryDeferred<T>;
412 * Reject a Deferred object and call any failCallbacks with the given args.
414 * @param args Optional arguments that are passed to the failCallbacks.
416 reject(value?: any, ...args: any[]): JQueryDeferred<T>;
418 * Reject a Deferred object and call any failCallbacks with the given context and args.
420 * @param context Context passed to the failCallbacks as the this object.
421 * @param args An optional array of arguments that are passed to the failCallbacks.
423 rejectWith(context: any, value?: any, ...args: any[]): JQueryDeferred<T>;
426 * Resolve a Deferred object and call any doneCallbacks with the given args.
428 * @param value First argument passed to doneCallbacks.
429 * @param args Optional subsequent arguments that are passed to the doneCallbacks.
431 resolve(value?: T, ...args: any[]): JQueryDeferred<T>;
434 * Resolve a Deferred object and call any doneCallbacks with the given context and args.
436 * @param context Context passed to the doneCallbacks as the this object.
437 * @param args An optional array of arguments that are passed to the doneCallbacks.
439 resolveWith(context: any, value?: T, ...args: any[]): JQueryDeferred<T>;
442 * Return a Deferred's Promise object.
444 * @param target Object onto which the promise methods have to be attached
446 promise(target?: any): JQueryPromise<T>;
448 // Deprecated - given no typings
449 pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise<any>;
453 * Interface of the JQuery extension of the W3C event object
455 interface BaseJQueryEventObject extends Event {
457 delegateTarget: Element;
458 isDefaultPrevented(): boolean;
459 isImmediatePropagationStopped(): boolean;
460 isPropagationStopped(): boolean;
462 originalEvent: Event;
463 preventDefault(): any;
464 relatedTarget: Element;
466 stopImmediatePropagation(): void;
467 stopPropagation(): void;
475 interface JQueryInputEventObject extends BaseJQueryEventObject {
482 interface JQueryMouseEventObject extends JQueryInputEventObject {
494 interface JQueryKeyEventObject extends JQueryInputEventObject {
501 interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject{
505 Collection of properties of the current browser
508 interface JQuerySupport {
511 changeBubbles?: boolean;
512 checkClone?: boolean;
516 hrefNormalized?: boolean;
517 htmlSerialize?: boolean;
518 leadingWhitespace?: boolean;
519 noCloneChecked?: boolean;
520 noCloneEvent?: boolean;
522 optDisabled?: boolean;
523 optSelected?: boolean;
524 scriptEval? (): boolean;
526 submitBubbles?: boolean;
530 interface JQueryParam {
532 * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
534 * @param obj An array or object to serialize.
539 * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
541 * @param obj An array or object to serialize.
542 * @param traditional A Boolean indicating whether to perform a traditional "shallow" serialization.
544 (obj: any, traditional: boolean): string;
548 * The interface used to construct jQuery events (with $.Event). It is
549 * defined separately instead of inline in JQueryStatic to allow
550 * overriding the construction function with specific strings
551 * returning specific event objects.
553 interface JQueryEventConstructor {
554 (name: string, eventProperties?: any): JQueryEventObject;
555 new (name: string, eventProperties?: any): JQueryEventObject;
559 * The interface used to specify coordinates.
561 interface JQueryCoordinates {
567 * Elements in the array returned by serializeArray()
569 interface JQuerySerializeArrayElement {
574 interface JQueryAnimationOptions {
576 * A string or number determining how long the animation will run.
580 * A string indicating which easing function to use for the transition.
584 * A function to call once the animation is complete.
588 * A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set.
590 step?: (now: number, tween: any) => any;
592 * A function to be called after each step of the animation, only once per animated element regardless of the number of animated properties. (version added: 1.8)
594 progress?: (animation: JQueryPromise<any>, progress: number, remainingMs: number) => any;
596 * A function to call when the animation begins. (version added: 1.8)
598 start?: (animation: JQueryPromise<any>) => any;
600 * A function to be called when the animation completes (its Promise object is resolved). (version added: 1.8)
602 done?: (animation: JQueryPromise<any>, jumpedToEnd: boolean) => any;
604 * A function to be called when the animation fails to complete (its Promise object is rejected). (version added: 1.8)
606 fail?: (animation: JQueryPromise<any>, jumpedToEnd: boolean) => any;
608 * A function to be called when the animation completes or stops without completing (its Promise object is either resolved or rejected). (version added: 1.8)
610 always?: (animation: JQueryPromise<any>, jumpedToEnd: boolean) => any;
612 * A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it.
616 * A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. (version added: 1.4)
618 specialEasing?: Object;
622 * Static members of jQuery (those on $ and jQuery themselves)
624 interface JQueryStatic {
627 * Perform an asynchronous HTTP (Ajax) request.
629 * @param settings 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().
631 ajax(settings: JQueryAjaxSettings): JQueryXHR;
633 * Perform an asynchronous HTTP (Ajax) request.
635 * @param url A string containing the URL to which the request is sent.
636 * @param settings 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().
638 ajax(url: string, settings?: JQueryAjaxSettings): JQueryXHR;
641 * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().
643 * @param dataTypes An optional string containing one or more space-separated dataTypes
644 * @param handler A handler to set default values for future Ajax requests.
646 ajaxPrefilter(dataTypes: string, handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void;
648 * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().
650 * @param handler A handler to set default values for future Ajax requests.
652 ajaxPrefilter(handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void;
654 ajaxSettings: JQueryAjaxSettings;
657 * Set default values for future Ajax requests. Its use is not recommended.
659 * @param options A set of key/value pairs that configure the default Ajax request. All options are optional.
661 ajaxSetup(options: JQueryAjaxSettings): void;
664 * Load data from the server using a HTTP GET request.
666 * @param url A string containing the URL to which the request is sent.
667 * @param success A callback function that is executed if the request succeeds.
668 * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
670 get(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
672 * Load data from the server using a HTTP GET request.
674 * @param url A string containing the URL to which the request is sent.
675 * @param data A plain object or string that is sent to the server with the request.
676 * @param success A callback function that is executed if the request succeeds.
677 * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
679 get(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
681 * Load JSON-encoded data from the server using a GET HTTP request.
683 * @param url A string containing the URL to which the request is sent.
684 * @param success A callback function that is executed if the request succeeds.
686 getJSON(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
688 * Load JSON-encoded data from the server using a GET HTTP request.
690 * @param url A string containing the URL to which the request is sent.
691 * @param data A plain object or string that is sent to the server with the request.
692 * @param success A callback function that is executed if the request succeeds.
694 getJSON(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
696 * Load a JavaScript file from the server using a GET HTTP request, then execute it.
698 * @param url A string containing the URL to which the request is sent.
699 * @param success A callback function that is executed if the request succeeds.
701 getScript(url: string, success?: (script: string, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
704 * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
709 * Load data from the server using a HTTP POST request.
711 * @param url A string containing the URL to which the request is sent.
712 * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case.
713 * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
715 post(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
717 * Load data from the server using a HTTP POST request.
719 * @param url A string containing the URL to which the request is sent.
720 * @param data A plain object or string that is sent to the server with the request.
721 * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case.
722 * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
724 post(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
727 * A multi-purpose callbacks list object that provides a powerful way to manage callback lists.
729 * @param flags An optional list of space-separated flags that change how the callback list behaves.
731 Callbacks(flags?: string): JQueryCallback;
734 * Holds or releases the execution of jQuery's ready event.
736 * @param hold Indicates whether the ready hold is being requested or released
738 holdReady(hold: boolean): void;
741 * Accepts a string containing a CSS selector which is then used to match a set of elements.
743 * @param selector A string containing a selector expression
744 * @param context A DOM Element, Document, or jQuery to use as context
746 (selector: string, context?: Element|JQuery): JQuery;
749 * Accepts a string containing a CSS selector which is then used to match a set of elements.
751 * @param element A DOM element to wrap in a jQuery object.
753 (element: Element): JQuery;
756 * Accepts a string containing a CSS selector which is then used to match a set of elements.
758 * @param elementArray An array containing a set of DOM elements to wrap in a jQuery object.
760 (elementArray: Element[]): JQuery;
763 * Binds a function to be executed when the DOM has finished loading.
765 * @param callback A function to execute after the DOM is ready.
767 (callback: (jQueryAlias?: JQueryStatic) => any): JQuery;
770 * Accepts a string containing a CSS selector which is then used to match a set of elements.
772 * @param object A plain object to wrap in a jQuery object.
774 (object: {}): JQuery;
777 * Accepts a string containing a CSS selector which is then used to match a set of elements.
779 * @param object An existing jQuery object to clone.
781 (object: JQuery): JQuery;
784 * Specify a function to execute when the DOM is fully loaded.
789 * Creates DOM elements on the fly from the provided string of raw HTML.
791 * @param html A string of HTML to create on the fly. Note that this parses HTML, not XML.
792 * @param ownerDocument A document in which the new elements will be created.
794 (html: string, ownerDocument?: Document): JQuery;
797 * Creates DOM elements on the fly from the provided string of raw HTML.
799 * @param html A string defining a single, standalone, HTML element (e.g. <div/> or <div></div>).
800 * @param attributes An object of attributes, events, and methods to call on the newly-created element.
802 (html: string, attributes: Object): JQuery;
805 * Relinquish jQuery's control of the $ variable.
807 * @param removeAll A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself).
809 noConflict(removeAll?: boolean): Object;
812 * Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events.
814 * @param deferreds One or more Deferred objects, or plain JavaScript objects.
816 when<T>(...deferreds: Array<T|JQueryPromise<T>/* as JQueryDeferred<T> */>): JQueryPromise<T>;
819 * Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties.
821 cssHooks: { [key: string]: any; };
825 * Store arbitrary data associated with the specified element. Returns the value that was set.
827 * @param element The DOM element to associate with the data.
828 * @param key A string naming the piece of data to set.
829 * @param value The new data value.
831 data<T>(element: Element, key: string, value: T): T;
833 * 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.
835 * @param element The DOM element to associate with the data.
836 * @param key A string naming the piece of data to set.
838 data(element: Element, key: string): any;
840 * 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.
842 * @param element The DOM element to associate with the data.
844 data(element: Element): any;
847 * Execute the next function on the queue for the matched element.
849 * @param element A DOM element from which to remove and execute a queued function.
850 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
852 dequeue(element: Element, queueName?: string): void;
855 * Determine whether an element has any jQuery data associated with it.
857 * @param element A DOM element to be checked for data.
859 hasData(element: Element): boolean;
862 * Show the queue of functions to be executed on the matched element.
864 * @param element A DOM element to inspect for an attached queue.
865 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
867 queue(element: Element, queueName?: string): any[];
869 * Manipulate the queue of functions to be executed on the matched element.
871 * @param element A DOM element where the array of queued functions is attached.
872 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
873 * @param newQueue An array of functions to replace the current queue contents.
875 queue(element: Element, queueName: string, newQueue: Function[]): JQuery;
877 * Manipulate the queue of functions to be executed on the matched element.
879 * @param element A DOM element on which to add a queued function.
880 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
881 * @param callback The new function to add to the queue.
883 queue(element: Element, queueName: string, callback: Function): JQuery;
886 * Remove a previously-stored piece of data.
888 * @param element A DOM element from which to remove data.
889 * @param name A string naming the piece of data to remove.
891 removeData(element: Element, name?: string): JQuery;
894 * A constructor function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function.
896 * @param beforeStart A function that is called just before the constructor returns.
898 Deferred<T>(beforeStart?: (deferred: JQueryDeferred<T>) => any): JQueryDeferred<T>;
906 * The rate (in milliseconds) at which animations fire.
910 speeds: { slow: number; fast: number; };
912 * Globally disable all animations.
919 * Takes a function and returns a new one that will always have a particular context.
921 * @param fnction The function whose context will be changed.
922 * @param context The object to which the context (this) of the function should be set.
923 * @param additionalArguments Any number of arguments to be passed to the function referenced in the function argument.
925 proxy(fnction: (...args: any[]) => any, context: Object, ...additionalArguments: any[]): any;
927 * Takes a function and returns a new one that will always have a particular context.
929 * @param context The object to which the context (this) of the function should be set.
930 * @param name The name of the function whose context will be changed (should be a property of the context object).
931 * @param additionalArguments Any number of arguments to be passed to the function named in the name argument.
933 proxy(context: Object, name: string, ...additionalArguments: any[]): any;
935 Event: JQueryEventConstructor;
938 * Takes a string and throws an exception containing it.
940 * @param message The message to send out.
942 error(message: any): JQuery;
945 fn: any; //TODO: Decide how we want to type this
950 support: JQuerySupport;
953 * Check to see if a DOM element is a descendant of another DOM element.
955 * @param container The DOM element that may contain the other element.
956 * @param contained The DOM element that may be contained by (a descendant of) the other element.
958 contains(container: Element, contained: Element): boolean;
961 * 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.
963 * @param collection The object or array to iterate over.
964 * @param callback The function that will be executed on every object.
968 callback: (indexInArray: number, valueOfElement: T) => any
972 * 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.
974 * @param collection The object or array to iterate over.
975 * @param callback The function that will be executed on every object.
979 callback: (indexInArray: any, valueOfElement: any) => any
983 * Merge the contents of two or more objects together into the first object.
985 * @param target An object that will receive the new properties if additional objects are passed in or that will extend the jQuery namespace if it is the sole argument.
986 * @param object1 An object containing additional properties to merge in.
987 * @param objectN Additional objects containing properties to merge in.
989 extend(target: any, object1?: any, ...objectN: any[]): any;
991 * Merge the contents of two or more objects together into the first object.
993 * @param deep If true, the merge becomes recursive (aka. deep copy).
994 * @param target The object to extend. It will receive the new properties.
995 * @param object1 An object containing additional properties to merge in.
996 * @param objectN Additional objects containing properties to merge in.
998 extend(deep: boolean, target: any, object1?: any, ...objectN: any[]): any;
1001 * Execute some JavaScript code globally.
1003 * @param code The JavaScript code to execute.
1005 globalEval(code: string): any;
1008 * Finds the elements of an array which satisfy a filter function. The original array is not affected.
1010 * @param array The array to search through.
1011 * @param func 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.
1012 * @param invert 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.
1014 grep<T>(array: T[], func: (elementOfArray: T, indexInArray: number) => boolean, invert?: boolean): T[];
1017 * Search for a specified value within an array and return its index (or -1 if not found).
1019 * @param value The value to search for.
1020 * @param array An array through which to search.
1021 * @param fromIndex he index of the array at which to begin the search. The default is 0, which will search the whole array.
1023 inArray<T>(value: T, array: T[], fromIndex?: number): number;
1026 * Determine whether the argument is an array.
1028 * @param obj Object to test whether or not it is an array.
1030 isArray(obj: any): boolean;
1032 * Check to see if an object is empty (contains no enumerable properties).
1034 * @param obj The object that will be checked to see if it's empty.
1036 isEmptyObject(obj: any): boolean;
1038 * Determine if the argument passed is a Javascript function object.
1040 * @param obj Object to test whether or not it is a function.
1042 isFunction(obj: any): boolean;
1044 * Determines whether its argument is a number.
1046 * @param obj The value to be tested.
1048 isNumeric(value: any): boolean;
1050 * Check to see if an object is a plain object (created using "{}" or "new Object").
1052 * @param obj The object that will be checked to see if it's a plain object.
1054 isPlainObject(obj: any): boolean;
1056 * Determine whether the argument is a window.
1058 * @param obj Object to test whether or not it is a window.
1060 isWindow(obj: any): boolean;
1062 * Check to see if a DOM node is within an XML document (or is an XML document).
1064 * @param node he DOM node that will be checked to see if it's in an XML document.
1066 isXMLDoc(node: Node): boolean;
1069 * Convert an array-like object into a true JavaScript array.
1071 * @param obj Any object to turn into a native Array.
1073 makeArray(obj: any): any[];
1076 * Translate all items in an array or object to new array of items.
1078 * @param array The Array to translate.
1079 * @param callback 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.
1081 map<T, U>(array: T[], callback: (elementOfArray: T, indexInArray: number) => U): U[];
1083 * Translate all items in an array or object to new array of items.
1085 * @param arrayOrObject The Array or Object to translate.
1086 * @param callback The function to process each item against. The first argument to the function is the value; the second argument is the index or key of the array or object property. The function can return any value to add to the array. A returned array will be flattened into the resulting array. Within the function, this refers to the global (window) object.
1088 map(arrayOrObject: any, callback: (value: any, indexOrKey: any) => any): any;
1091 * Merge the contents of two arrays together into the first array.
1093 * @param first The first array to merge, the elements of second added.
1094 * @param second The second array to merge into the first, unaltered.
1096 merge<T>(first: T[], second: T[]): T[];
1099 * An empty function.
1104 * Return a number representing the current time.
1109 * Takes a well-formed JSON string and returns the resulting JavaScript object.
1111 * @param json The JSON string to parse.
1113 parseJSON(json: string): any;
1116 * Parses a string into an XML document.
1118 * @param data a well-formed XML string to be parsed
1120 parseXML(data: string): XMLDocument;
1123 * Remove the whitespace from the beginning and end of a string.
1125 * @param str Remove the whitespace from the beginning and end of a string.
1127 trim(str: string): string;
1130 * Determine the internal JavaScript [[Class]] of an object.
1132 * @param obj Object to get the internal JavaScript [[Class]] of.
1134 type(obj: any): string;
1137 * 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.
1139 * @param array The Array of DOM elements.
1141 unique(array: Element[]): Element[];
1144 * Parses a string into an array of DOM nodes.
1146 * @param data HTML string to be parsed
1147 * @param context DOM element to serve as the context in which the HTML fragment will be created
1148 * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string
1150 parseHTML(data: string, context?: HTMLElement, keepScripts?: boolean): any[];
1153 * Parses a string into an array of DOM nodes.
1155 * @param data HTML string to be parsed
1156 * @param context DOM element to serve as the context in which the HTML fragment will be created
1157 * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string
1159 parseHTML(data: string, context?: Document, keepScripts?: boolean): any[];
1163 * The jQuery instance members
1167 * Register a handler to be called when Ajax requests complete. This is an AjaxEvent.
1169 * @param handler The function to be invoked.
1171 ajaxComplete(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: any) => any): JQuery;
1173 * Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event.
1175 * @param handler The function to be invoked.
1177 ajaxError(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxSettings: JQueryAjaxSettings, thrownError: any) => any): JQuery;
1179 * Attach a function to be executed before an Ajax request is sent. This is an Ajax Event.
1181 * @param handler The function to be invoked.
1183 ajaxSend(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxOptions: JQueryAjaxSettings) => any): JQuery;
1185 * Register a handler to be called when the first Ajax request begins. This is an Ajax Event.
1187 * @param handler The function to be invoked.
1189 ajaxStart(handler: () => any): JQuery;
1191 * Register a handler to be called when all Ajax requests have completed. This is an Ajax Event.
1193 * @param handler The function to be invoked.
1195 ajaxStop(handler: () => any): JQuery;
1197 * Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.
1199 * @param handler The function to be invoked.
1201 ajaxSuccess(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: JQueryAjaxSettings) => any): JQuery;
1204 * Load data from the server and place the returned HTML into the matched element.
1206 * @param url A string containing the URL to which the request is sent.
1207 * @param data A plain object or string that is sent to the server with the request.
1208 * @param complete A callback function that is executed when the request completes.
1210 load(url: string, data?: string|Object, complete?: (responseText: string, textStatus: string, XMLHttpRequest: XMLHttpRequest) => any): JQuery;
1213 * Encode a set of form elements as a string for submission.
1215 serialize(): string;
1217 * Encode a set of form elements as an array of names and values.
1219 serializeArray(): JQuerySerializeArrayElement[];
1222 * Adds the specified class(es) to each of the set of matched elements.
1224 * @param className One or more space-separated classes to be added to the class attribute of each matched element.
1226 addClass(className: string): JQuery;
1228 * Adds the specified class(es) to each of the set of matched elements.
1230 * @param function A function returning one or more space-separated class names to be added to the existing class name(s). Receives the index position of the element in the set and the existing class name(s) as arguments. Within the function, this refers to the current element in the set.
1232 addClass(func: (index: number, className: string) => string): JQuery;
1235 * Add the previous set of elements on the stack to the current set, optionally filtered by a selector.
1237 addBack(selector?: string): JQuery;
1240 * Get the value of an attribute for the first element in the set of matched elements.
1242 * @param attributeName The name of the attribute to get.
1244 attr(attributeName: string): string;
1246 * Set one or more attributes for the set of matched elements.
1248 * @param attributeName The name of the attribute to set.
1249 * @param value A value to set for the attribute.
1251 attr(attributeName: string, value: string|number): JQuery;
1253 * Set one or more attributes for the set of matched elements.
1255 * @param attributeName The name of the attribute to set.
1256 * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old attribute value as arguments.
1258 attr(attributeName: string, func: (index: number, attr: string) => string|number): JQuery;
1260 * Set one or more attributes for the set of matched elements.
1262 * @param attributes An object of attribute-value pairs to set.
1264 attr(attributes: Object): JQuery;
1267 * Determine whether any of the matched elements are assigned the given class.
1269 * @param className The class name to search for.
1271 hasClass(className: string): boolean;
1274 * Get the HTML contents of the first element in the set of matched elements.
1278 * Set the HTML contents of each element in the set of matched elements.
1280 * @param htmlString A string of HTML to set as the content of each matched element.
1282 html(htmlString: string): JQuery;
1284 * Set the HTML contents of each element in the set of matched elements.
1286 * @param func A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set.
1288 html(func: (index: number, oldhtml: string) => string): JQuery;
1290 * Set the HTML contents of each element in the set of matched elements.
1292 * @param func A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set.
1296 * Get the value of a property for the first element in the set of matched elements.
1298 * @param propertyName The name of the property to get.
1300 prop(propertyName: string): any;
1302 * Set one or more properties for the set of matched elements.
1304 * @param propertyName The name of the property to set.
1305 * @param value A value to set for the property.
1307 prop(propertyName: string, value: string|number|boolean): JQuery;
1309 * Set one or more properties for the set of matched elements.
1311 * @param properties An object of property-value pairs to set.
1313 prop(properties: Object): JQuery;
1315 * Set one or more properties for the set of matched elements.
1317 * @param propertyName The name of the property to set.
1318 * @param func A function returning the value to set. Receives the index position of the element in the set and the old property value as arguments. Within the function, the keyword this refers to the current element.
1320 prop(propertyName: string, func: (index: number, oldPropertyValue: any) => any): JQuery;
1323 * Remove an attribute from each element in the set of matched elements.
1325 * @param attributeName An attribute to remove; as of version 1.7, it can be a space-separated list of attributes.
1327 removeAttr(attributeName: string): JQuery;
1330 * Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
1332 * @param className One or more space-separated classes to be removed from the class attribute of each matched element.
1334 removeClass(className?: string): JQuery;
1336 * Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
1338 * @param function A function returning one or more space-separated class names to be removed. Receives the index position of the element in the set and the old class value as arguments.
1340 removeClass(func: (index: number, className: string) => string): JQuery;
1343 * Remove a property for the set of matched elements.
1345 * @param propertyName The name of the property to remove.
1347 removeProp(propertyName: string): JQuery;
1350 * 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.
1352 * @param className One or more class names (separated by spaces) to be toggled for each element in the matched set.
1353 * @param swtch A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed.
1355 toggleClass(className: string, swtch?: boolean): JQuery;
1357 * 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.
1359 * @param swtch A boolean value to determine whether the class should be added or removed.
1361 toggleClass(swtch?: boolean): JQuery;
1363 * 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.
1365 * @param func A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the switch as arguments.
1366 * @param swtch A boolean value to determine whether the class should be added or removed.
1368 toggleClass(func: (index: number, className: string, swtch: boolean) => string, swtch?: boolean): JQuery;
1371 * Get the current value of the first element in the set of matched elements.
1375 * Set the value of each element in the set of matched elements.
1377 * @param value A string of text or an array of strings corresponding to the value of each matched element to set as selected/checked.
1379 val(value: string|string[]): JQuery;
1381 * Set the value of each element in the set of matched elements.
1383 * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.
1385 val(func: (index: number, value: string) => string): JQuery;
1389 * Get the value of style properties for the first element in the set of matched elements.
1391 * @param propertyName A CSS property.
1393 css(propertyName: string): string;
1395 * Set one or more CSS properties for the set of matched elements.
1397 * @param propertyName A CSS property name.
1398 * @param value A value to set for the property.
1400 css(propertyName: string, value: string|number): JQuery;
1402 * Set one or more CSS properties for the set of matched elements.
1404 * @param propertyName A CSS property name.
1405 * @param value A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.
1407 css(propertyName: string, value: (index: number, value: string) => string|number): JQuery;
1409 * Set one or more CSS properties for the set of matched elements.
1411 * @param properties An object of property-value pairs to set.
1413 css(properties: Object): JQuery;
1416 * Get the current computed height for the first element in the set of matched elements.
1420 * Set the CSS height of every matched element.
1422 * @param value An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string).
1424 height(value: number|string): JQuery;
1426 * Set the CSS height of every matched element.
1428 * @param func A function returning the height to set. Receives the index position of the element in the set and the old height as arguments. Within the function, this refers to the current element in the set.
1430 height(func: (index: number, height: number) => number|string): JQuery;
1433 * Get the current computed height for the first element in the set of matched elements, including padding but not border.
1435 innerHeight(): number;
1438 * Sets the inner height on elements in the set of matched elements, including padding but not border.
1440 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1442 innerHeight(height: number|string): JQuery;
1445 * Get the current computed width for the first element in the set of matched elements, including padding but not border.
1447 innerWidth(): number;
1450 * Sets the inner width on elements in the set of matched elements, including padding but not border.
1452 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1454 innerWidth(width: number|string): JQuery;
1457 * Get the current coordinates of the first element in the set of matched elements, relative to the document.
1459 offset(): JQueryCoordinates;
1461 * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
1463 * @param coordinates An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
1465 offset(coordinates: JQueryCoordinates): JQuery;
1467 * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
1469 * @param func A function to return the coordinates to set. Receives the index of the element in the collection as the first argument and the current coordinates as the second argument. The function should return an object with the new top and left properties.
1471 offset(func: (index: number, coords: JQueryCoordinates) => JQueryCoordinates): JQuery;
1474 * 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.
1476 * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation.
1478 outerHeight(includeMargin?: boolean): number;
1481 * Sets the outer height on elements in the set of matched elements, including padding and border.
1483 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1485 outerHeight(height: number|string): JQuery;
1488 * Get the current computed width for the first element in the set of matched elements, including padding and border.
1490 * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation.
1492 outerWidth(includeMargin?: boolean): number;
1495 * Sets the outer width on elements in the set of matched elements, including padding and border.
1497 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1499 outerWidth(width: number|string): JQuery;
1502 * Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.
1504 position(): JQueryCoordinates;
1507 * Get the current horizontal position of the scroll bar for the first element in the set of matched elements or set the horizontal position of the scroll bar for every matched element.
1509 scrollLeft(): number;
1511 * Set the current horizontal position of the scroll bar for each of the set of matched elements.
1513 * @param value An integer indicating the new position to set the scroll bar to.
1515 scrollLeft(value: number): JQuery;
1518 * Get the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element.
1520 scrollTop(): number;
1522 * Set the current vertical position of the scroll bar for each of the set of matched elements.
1524 * @param value An integer indicating the new position to set the scroll bar to.
1526 scrollTop(value: number): JQuery;
1529 * Get the current computed width for the first element in the set of matched elements.
1533 * Set the CSS width of each element in the set of matched elements.
1535 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1537 width(value: number|string): JQuery;
1539 * Set the CSS width of each element in the set of matched elements.
1541 * @param func A function returning the width to set. Receives the index position of the element in the set and the old width as arguments. Within the function, this refers to the current element in the set.
1543 width(func: (index: number, width: number) => number|string): JQuery;
1546 * Remove from the queue all items that have not yet been run.
1548 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
1550 clearQueue(queueName?: string): JQuery;
1553 * Store arbitrary data associated with the matched elements.
1555 * @param key A string naming the piece of data to set.
1556 * @param value The new data value; it can be any Javascript type including Array or Object.
1558 data(key: string, value: any): JQuery;
1560 * Store arbitrary data associated with the matched elements.
1562 * @param obj An object of key-value pairs of data to update.
1564 data(obj: { [key: string]: any; }): JQuery;
1566 * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute.
1568 * @param key Name of the data stored.
1570 data(key: string): any;
1572 * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute.
1577 * Execute the next function on the queue for the matched elements.
1579 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
1581 dequeue(queueName?: string): JQuery;
1584 * Remove a previously-stored piece of data.
1586 * @param name A string naming the piece of data to delete or space-separated string naming the pieces of data to delete.
1588 removeData(name: string): JQuery;
1590 * Remove a previously-stored piece of data.
1592 * @param list An array of strings naming the pieces of data to delete.
1594 removeData(list: string[]): JQuery;
1597 * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.
1599 * @param type The type of queue that needs to be observed. (default: fx)
1600 * @param target Object onto which the promise methods have to be attached
1602 promise(type?: string, target?: Object): JQueryPromise<any>;
1605 * Perform a custom animation of a set of CSS properties.
1607 * @param properties An object of CSS properties and values that the animation will move toward.
1608 * @param duration A string or number determining how long the animation will run.
1609 * @param complete A function to call once the animation is complete.
1611 animate(properties: Object, duration?: string|number, complete?: Function): JQuery;
1613 * Perform a custom animation of a set of CSS properties.
1615 * @param properties An object of CSS properties and values that the animation will move toward.
1616 * @param duration A string or number determining how long the animation will run.
1617 * @param easing A string indicating which easing function to use for the transition. (default: swing)
1618 * @param complete A function to call once the animation is complete.
1620 animate(properties: Object, duration?: string|number, easing?: string, complete?: Function): JQuery;
1622 * Perform a custom animation of a set of CSS properties.
1624 * @param properties An object of CSS properties and values that the animation will move toward.
1625 * @param options A map of additional options to pass to the method.
1627 animate(properties: Object, options: JQueryAnimationOptions): JQuery;
1630 * Set a timer to delay execution of subsequent items in the queue.
1632 * @param duration An integer indicating the number of milliseconds to delay execution of the next item in the queue.
1633 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
1635 delay(duration: number, queueName?: string): JQuery;
1638 * Display the matched elements by fading them to opaque.
1640 * @param duration A string or number determining how long the animation will run.
1641 * @param complete A function to call once the animation is complete.
1643 fadeIn(duration?: number|string, complete?: Function): JQuery;
1645 * Display the matched elements by fading them to opaque.
1647 * @param duration A string or number determining how long the animation will run.
1648 * @param easing A string indicating which easing function to use for the transition.
1649 * @param complete A function to call once the animation is complete.
1651 fadeIn(duration?: number|string, easing?: string, complete?: Function): JQuery;
1653 * Display the matched elements by fading them to opaque.
1655 * @param options A map of additional options to pass to the method.
1657 fadeIn(options: JQueryAnimationOptions): JQuery;
1660 * Hide the matched elements by fading them to transparent.
1662 * @param duration A string or number determining how long the animation will run.
1663 * @param complete A function to call once the animation is complete.
1665 fadeOut(duration?: number|string, complete?: Function): JQuery;
1667 * Hide the matched elements by fading them to transparent.
1669 * @param duration A string or number determining how long the animation will run.
1670 * @param easing A string indicating which easing function to use for the transition.
1671 * @param complete A function to call once the animation is complete.
1673 fadeOut(duration?: number|string, easing?: string, complete?: Function): JQuery;
1675 * Hide the matched elements by fading them to transparent.
1677 * @param options A map of additional options to pass to the method.
1679 fadeOut(options: JQueryAnimationOptions): JQuery;
1682 * Adjust the opacity of the matched elements.
1684 * @param duration A string or number determining how long the animation will run.
1685 * @param opacity A number between 0 and 1 denoting the target opacity.
1686 * @param complete A function to call once the animation is complete.
1688 fadeTo(duration: string|number, opacity: number, complete?: Function): JQuery;
1690 * Adjust the opacity of the matched elements.
1692 * @param duration A string or number determining how long the animation will run.
1693 * @param opacity A number between 0 and 1 denoting the target opacity.
1694 * @param easing A string indicating which easing function to use for the transition.
1695 * @param complete A function to call once the animation is complete.
1697 fadeTo(duration: string|number, opacity: number, easing?: string, complete?: Function): JQuery;
1700 * Display or hide the matched elements by animating their opacity.
1702 * @param duration A string or number determining how long the animation will run.
1703 * @param complete A function to call once the animation is complete.
1705 fadeToggle(duration?: number|string, complete?: Function): JQuery;
1707 * Display or hide the matched elements by animating their opacity.
1709 * @param duration A string or number determining how long the animation will run.
1710 * @param easing A string indicating which easing function to use for the transition.
1711 * @param complete A function to call once the animation is complete.
1713 fadeToggle(duration?: number|string, easing?: string, complete?: Function): JQuery;
1715 * Display or hide the matched elements by animating their opacity.
1717 * @param options A map of additional options to pass to the method.
1719 fadeToggle(options: JQueryAnimationOptions): JQuery;
1722 * Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements.
1724 * @param queue The name of the queue in which to stop animations.
1726 finish(queue?: string): JQuery;
1729 * Hide the matched elements.
1731 * @param duration A string or number determining how long the animation will run.
1732 * @param complete A function to call once the animation is complete.
1734 hide(duration?: number|string, complete?: Function): JQuery;
1736 * Hide the matched elements.
1738 * @param duration A string or number determining how long the animation will run.
1739 * @param easing A string indicating which easing function to use for the transition.
1740 * @param complete A function to call once the animation is complete.
1742 hide(duration?: number|string, easing?: string, complete?: Function): JQuery;
1744 * Hide the matched elements.
1746 * @param options A map of additional options to pass to the method.
1748 hide(options: JQueryAnimationOptions): JQuery;
1751 * Display the matched elements.
1753 * @param duration A string or number determining how long the animation will run.
1754 * @param complete A function to call once the animation is complete.
1756 show(duration?: number|string, complete?: Function): JQuery;
1758 * Display the matched elements.
1760 * @param duration A string or number determining how long the animation will run.
1761 * @param easing A string indicating which easing function to use for the transition.
1762 * @param complete A function to call once the animation is complete.
1764 show(duration?: number|string, easing?: string, complete?: Function): JQuery;
1766 * Display the matched elements.
1768 * @param options A map of additional options to pass to the method.
1770 show(options: JQueryAnimationOptions): JQuery;
1773 * Display the matched elements with a sliding motion.
1775 * @param duration A string or number determining how long the animation will run.
1776 * @param complete A function to call once the animation is complete.
1778 slideDown(duration?: number|string, complete?: Function): JQuery;
1780 * Display the matched elements with a sliding motion.
1782 * @param duration A string or number determining how long the animation will run.
1783 * @param easing A string indicating which easing function to use for the transition.
1784 * @param complete A function to call once the animation is complete.
1786 slideDown(duration?: number|string, easing?: string, complete?: Function): JQuery;
1788 * Display the matched elements with a sliding motion.
1790 * @param options A map of additional options to pass to the method.
1792 slideDown(options: JQueryAnimationOptions): JQuery;
1795 * Display or hide the matched elements with a sliding motion.
1797 * @param duration A string or number determining how long the animation will run.
1798 * @param complete A function to call once the animation is complete.
1800 slideToggle(duration?: number|string, complete?: Function): JQuery;
1802 * Display or hide the matched elements with a sliding motion.
1804 * @param duration A string or number determining how long the animation will run.
1805 * @param easing A string indicating which easing function to use for the transition.
1806 * @param complete A function to call once the animation is complete.
1808 slideToggle(duration?: number|string, easing?: string, complete?: Function): JQuery;
1810 * Display or hide the matched elements with a sliding motion.
1812 * @param options A map of additional options to pass to the method.
1814 slideToggle(options: JQueryAnimationOptions): JQuery;
1817 * Hide the matched elements with a sliding motion.
1819 * @param duration A string or number determining how long the animation will run.
1820 * @param complete A function to call once the animation is complete.
1822 slideUp(duration?: number|string, complete?: Function): JQuery;
1824 * Hide the matched elements with a sliding motion.
1826 * @param duration A string or number determining how long the animation will run.
1827 * @param easing A string indicating which easing function to use for the transition.
1828 * @param complete A function to call once the animation is complete.
1830 slideUp(duration?: number|string, easing?: string, complete?: Function): JQuery;
1832 * Hide the matched elements with a sliding motion.
1834 * @param options A map of additional options to pass to the method.
1836 slideUp(options: JQueryAnimationOptions): JQuery;
1839 * Stop the currently-running animation on the matched elements.
1841 * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false.
1842 * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false.
1844 stop(clearQueue?: boolean, jumpToEnd?: boolean): JQuery;
1846 * Stop the currently-running animation on the matched elements.
1848 * @param queue The name of the queue in which to stop animations.
1849 * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false.
1850 * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false.
1852 stop(queue?: string, clearQueue?: boolean, jumpToEnd?: boolean): JQuery;
1855 * Display or hide the matched elements.
1857 * @param duration A string or number determining how long the animation will run.
1858 * @param complete A function to call once the animation is complete.
1860 toggle(duration?: number|string, complete?: Function): JQuery;
1862 * Display or hide the matched elements.
1864 * @param duration A string or number determining how long the animation will run.
1865 * @param easing A string indicating which easing function to use for the transition.
1866 * @param complete A function to call once the animation is complete.
1868 toggle(duration?: number|string, easing?: string, complete?: Function): JQuery;
1870 * Display or hide the matched elements.
1872 * @param options A map of additional options to pass to the method.
1874 toggle(options: JQueryAnimationOptions): JQuery;
1876 * Display or hide the matched elements.
1878 * @param showOrHide A Boolean indicating whether to show or hide the elements.
1880 toggle(showOrHide: boolean): JQuery;
1883 * Attach a handler to an event for the elements.
1885 * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1886 * @param eventData An object containing data that will be passed to the event handler.
1887 * @param handler A function to execute each time the event is triggered.
1889 bind(eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
1891 * Attach a handler to an event for the elements.
1893 * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1894 * @param handler A function to execute each time the event is triggered.
1896 bind(eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
1898 * Attach a handler to an event for the elements.
1900 * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1901 * @param eventData An object containing data that will be passed to the event handler.
1902 * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true.
1904 bind(eventType: string, eventData: any, preventBubble: boolean): JQuery;
1906 * Attach a handler to an event for the elements.
1908 * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1909 * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true.
1911 bind(eventType: string, preventBubble: boolean): JQuery;
1913 * Attach a handler to an event for the elements.
1915 * @param events An object containing one or more DOM event types and functions to execute for them.
1917 bind(events: any): JQuery;
1920 * Trigger the "blur" event on an element
1924 * Bind an event handler to the "blur" JavaScript event
1926 * @param handler A function to execute each time the event is triggered.
1928 blur(handler: (eventObject: JQueryEventObject) => any): JQuery;
1930 * Bind an event handler to the "blur" JavaScript event
1932 * @param eventData An object containing data that will be passed to the event handler.
1933 * @param handler A function to execute each time the event is triggered.
1935 blur(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
1938 * Trigger the "change" event on an element.
1942 * Bind an event handler to the "change" JavaScript event
1944 * @param handler A function to execute each time the event is triggered.
1946 change(handler: (eventObject: JQueryEventObject) => any): JQuery;
1948 * Bind an event handler to the "change" JavaScript event
1950 * @param eventData An object containing data that will be passed to the event handler.
1951 * @param handler A function to execute each time the event is triggered.
1953 change(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
1956 * Trigger the "click" event on an element.
1960 * Bind an event handler to the "click" JavaScript event
1962 * @param eventData An object containing data that will be passed to the event handler.
1964 click(handler: (eventObject: JQueryEventObject) => any): JQuery;
1966 * Bind an event handler to the "click" JavaScript event
1968 * @param eventData An object containing data that will be passed to the event handler.
1969 * @param handler A function to execute each time the event is triggered.
1971 click(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
1974 * Trigger the "dblclick" event on an element.
1978 * Bind an event handler to the "dblclick" JavaScript event
1980 * @param handler A function to execute each time the event is triggered.
1982 dblclick(handler: (eventObject: JQueryEventObject) => any): JQuery;
1984 * Bind an event handler to the "dblclick" JavaScript event
1986 * @param eventData An object containing data that will be passed to the event handler.
1987 * @param handler A function to execute each time the event is triggered.
1989 dblclick(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
1991 delegate(selector: any, eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
1992 delegate(selector: any, eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
1995 * Trigger the "focus" event on an element.
1999 * Bind an event handler to the "focus" JavaScript event
2001 * @param handler A function to execute each time the event is triggered.
2003 focus(handler: (eventObject: JQueryEventObject) => any): JQuery;
2005 * Bind an event handler to the "focus" JavaScript event
2007 * @param eventData An object containing data that will be passed to the event handler.
2008 * @param handler A function to execute each time the event is triggered.
2010 focus(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2013 * Bind an event handler to the "focusin" JavaScript event
2015 * @param handler A function to execute each time the event is triggered.
2017 focusin(handler: (eventObject: JQueryEventObject) => any): JQuery;
2019 * Bind an event handler to the "focusin" JavaScript event
2021 * @param eventData An object containing data that will be passed to the event handler.
2022 * @param handler A function to execute each time the event is triggered.
2024 focusin(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2027 * Bind an event handler to the "focusout" JavaScript event
2029 * @param handler A function to execute each time the event is triggered.
2031 focusout(handler: (eventObject: JQueryEventObject) => any): JQuery;
2033 * Bind an event handler to the "focusout" JavaScript event
2035 * @param eventData An object containing data that will be passed to the event handler.
2036 * @param handler A function to execute each time the event is triggered.
2038 focusout(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2041 * Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.
2043 * @param handlerIn A function to execute when the mouse pointer enters the element.
2044 * @param handlerOut A function to execute when the mouse pointer leaves the element.
2046 hover(handlerIn: (eventObject: JQueryEventObject) => any, handlerOut: (eventObject: JQueryEventObject) => any): JQuery;
2048 * Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements.
2050 * @param handlerInOut A function to execute when the mouse pointer enters or leaves the element.
2052 hover(handlerInOut: (eventObject: JQueryEventObject) => any): JQuery;
2055 * Trigger the "keydown" event on an element.
2059 * Bind an event handler to the "keydown" JavaScript event
2061 * @param handler A function to execute each time the event is triggered.
2063 keydown(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
2065 * Bind an event handler to the "keydown" JavaScript event
2067 * @param eventData An object containing data that will be passed to the event handler.
2068 * @param handler A function to execute each time the event is triggered.
2070 keydown(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
2073 * Trigger the "keypress" event on an element.
2077 * Bind an event handler to the "keypress" JavaScript event
2079 * @param handler A function to execute each time the event is triggered.
2081 keypress(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
2083 * Bind an event handler to the "keypress" JavaScript event
2085 * @param eventData An object containing data that will be passed to the event handler.
2086 * @param handler A function to execute each time the event is triggered.
2088 keypress(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
2091 * Trigger the "keyup" event on an element.
2095 * Bind an event handler to the "keyup" JavaScript event
2097 * @param handler A function to execute each time the event is triggered.
2099 keyup(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
2101 * Bind an event handler to the "keyup" JavaScript event
2103 * @param eventData An object containing data that will be passed to the event handler.
2104 * @param handler A function to execute each time the event is triggered.
2106 keyup(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
2109 * Bind an event handler to the "load" JavaScript event.
2111 * @param handler A function to execute when the event is triggered.
2113 load(handler: (eventObject: JQueryEventObject) => any): JQuery;
2115 * Bind an event handler to the "load" JavaScript event.
2117 * @param eventData An object containing data that will be passed to the event handler.
2118 * @param handler A function to execute when the event is triggered.
2120 load(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2123 * Trigger the "mousedown" event on an element.
2125 mousedown(): JQuery;
2127 * Bind an event handler to the "mousedown" JavaScript event.
2129 * @param handler A function to execute when the event is triggered.
2131 mousedown(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2133 * Bind an event handler to the "mousedown" JavaScript event.
2135 * @param eventData An object containing data that will be passed to the event handler.
2136 * @param handler A function to execute when the event is triggered.
2138 mousedown(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2141 * Trigger the "mouseenter" event on an element.
2143 mouseenter(): JQuery;
2145 * Bind an event handler to be fired when the mouse enters an element.
2147 * @param handler A function to execute when the event is triggered.
2149 mouseenter(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2151 * Bind an event handler to be fired when the mouse enters an element.
2153 * @param eventData An object containing data that will be passed to the event handler.
2154 * @param handler A function to execute when the event is triggered.
2156 mouseenter(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2159 * Trigger the "mouseleave" event on an element.
2161 mouseleave(): JQuery;
2163 * Bind an event handler to be fired when the mouse leaves an element.
2165 * @param handler A function to execute when the event is triggered.
2167 mouseleave(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2169 * Bind an event handler to be fired when the mouse leaves an element.
2171 * @param eventData An object containing data that will be passed to the event handler.
2172 * @param handler A function to execute when the event is triggered.
2174 mouseleave(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2177 * Trigger the "mousemove" event on an element.
2179 mousemove(): JQuery;
2181 * Bind an event handler to the "mousemove" JavaScript event.
2183 * @param handler A function to execute when the event is triggered.
2185 mousemove(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2187 * Bind an event handler to the "mousemove" JavaScript event.
2189 * @param eventData An object containing data that will be passed to the event handler.
2190 * @param handler A function to execute when the event is triggered.
2192 mousemove(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2195 * Trigger the "mouseout" event on an element.
2199 * Bind an event handler to the "mouseout" JavaScript event.
2201 * @param handler A function to execute when the event is triggered.
2203 mouseout(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2205 * Bind an event handler to the "mouseout" JavaScript event.
2207 * @param eventData An object containing data that will be passed to the event handler.
2208 * @param handler A function to execute when the event is triggered.
2210 mouseout(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2213 * Trigger the "mouseover" event on an element.
2215 mouseover(): JQuery;
2217 * Bind an event handler to the "mouseover" JavaScript event.
2219 * @param handler A function to execute when the event is triggered.
2221 mouseover(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2223 * Bind an event handler to the "mouseover" JavaScript event.
2225 * @param eventData An object containing data that will be passed to the event handler.
2226 * @param handler A function to execute when the event is triggered.
2228 mouseover(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2231 * Trigger the "mouseup" event on an element.
2235 * Bind an event handler to the "mouseup" JavaScript event.
2237 * @param handler A function to execute when the event is triggered.
2239 mouseup(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2241 * Bind an event handler to the "mouseup" JavaScript event.
2243 * @param eventData An object containing data that will be passed to the event handler.
2244 * @param handler A function to execute when the event is triggered.
2246 mouseup(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2249 * Remove an event handler.
2253 * Remove an event handler.
2255 * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
2256 * @param selector A selector which should match the one originally passed to .on() when attaching event handlers.
2257 * @param handler A handler function previously attached for the event(s), or the special value false.
2259 off(events: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2261 * Remove an event handler.
2263 * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
2264 * @param handler A handler function previously attached for the event(s), or the special value false.
2266 off(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
2268 * Remove an event handler.
2270 * @param events An object where the string keys represent one or more space-separated event types and optional namespaces, and the values represent handler functions previously attached for the event(s).
2271 * @param selector A selector which should match the one originally passed to .on() when attaching event handlers.
2273 off(events: { [key: string]: any; }, selector?: string): JQuery;
2276 * Attach an event handler function for one or more events to the selected elements.
2278 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2279 * @param handler 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. Rest parameter args is for optional parameters passed to jQuery.trigger(). Note that the actual parameters on the event handler function must be marked as optional (? syntax).
2281 on(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
2283 * Attach an event handler function for one or more events to the selected elements.
2285 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2286 * @param data Data to be passed to the handler in event.data when an event is triggered.
2287 * @param handler 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.
2289 on(events: string, data : any, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
2291 * Attach an event handler function for one or more events to the selected elements.
2293 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2294 * @param selector 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.
2295 * @param handler 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.
2297 on(events: string, selector: string, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery;
2299 * Attach an event handler function for one or more events to the selected elements.
2301 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2302 * @param selector 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.
2303 * @param data Data to be passed to the handler in event.data when an event is triggered.
2304 * @param handler 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.
2306 on(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery;
2308 * Attach an event handler function for one or more events to the selected elements.
2310 * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
2311 * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.
2312 * @param data Data to be passed to the handler in event.data when an event occurs.
2314 on(events: { [key: string]: any; }, selector?: string, data?: any): JQuery;
2316 * Attach an event handler function for one or more events to the selected elements.
2318 * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
2319 * @param data Data to be passed to the handler in event.data when an event occurs.
2321 on(events: { [key: string]: any; }, data?: any): JQuery;
2324 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2326 * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
2327 * @param handler A function to execute at the time the event is triggered.
2329 one(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
2331 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2333 * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
2334 * @param data An object containing data that will be passed to the event handler.
2335 * @param handler A function to execute at the time the event is triggered.
2337 one(events: string, data: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2340 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2342 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2343 * @param selector 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.
2344 * @param handler 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.
2346 one(events: string, selector: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
2348 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2350 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2351 * @param selector 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.
2352 * @param data Data to be passed to the handler in event.data when an event is triggered.
2353 * @param handler 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.
2355 one(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
2358 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2360 * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
2361 * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.
2362 * @param data Data to be passed to the handler in event.data when an event occurs.
2364 one(events: { [key: string]: any; }, selector?: string, data?: any): JQuery;
2367 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2369 * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
2370 * @param data Data to be passed to the handler in event.data when an event occurs.
2372 one(events: { [key: string]: any; }, data?: any): JQuery;
2376 * Specify a function to execute when the DOM is fully loaded.
2378 * @param handler A function to execute after the DOM is ready.
2380 ready(handler: (jQueryAlias?: JQueryStatic) => any): JQuery;
2383 * Trigger the "resize" event on an element.
2387 * Bind an event handler to the "resize" JavaScript event.
2389 * @param handler A function to execute each time the event is triggered.
2391 resize(handler: (eventObject: JQueryEventObject) => any): JQuery;
2393 * Bind an event handler to the "resize" JavaScript event.
2395 * @param eventData An object containing data that will be passed to the event handler.
2396 * @param handler A function to execute each time the event is triggered.
2398 resize(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2401 * Trigger the "scroll" event on an element.
2405 * Bind an event handler to the "scroll" JavaScript event.
2407 * @param handler A function to execute each time the event is triggered.
2409 scroll(handler: (eventObject: JQueryEventObject) => any): JQuery;
2411 * Bind an event handler to the "scroll" JavaScript event.
2413 * @param eventData An object containing data that will be passed to the event handler.
2414 * @param handler A function to execute each time the event is triggered.
2416 scroll(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2419 * Trigger the "select" event on an element.
2423 * Bind an event handler to the "select" JavaScript event.
2425 * @param handler A function to execute each time the event is triggered.
2427 select(handler: (eventObject: JQueryEventObject) => any): JQuery;
2429 * Bind an event handler to the "select" JavaScript event.
2431 * @param eventData An object containing data that will be passed to the event handler.
2432 * @param handler A function to execute each time the event is triggered.
2434 select(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2437 * Trigger the "submit" event on an element.
2441 * Bind an event handler to the "submit" JavaScript event
2443 * @param handler A function to execute each time the event is triggered.
2445 submit(handler: (eventObject: JQueryEventObject) => any): JQuery;
2447 * Bind an event handler to the "submit" JavaScript event
2449 * @param eventData An object containing data that will be passed to the event handler.
2450 * @param handler A function to execute each time the event is triggered.
2452 submit(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2455 * Execute all handlers and behaviors attached to the matched elements for the given event type.
2457 * @param eventType A string containing a JavaScript event type, such as click or submit.
2458 * @param extraParameters Additional parameters to pass along to the event handler.
2460 trigger(eventType: string, extraParameters?: any[]|Object): JQuery;
2462 * Execute all handlers and behaviors attached to the matched elements for the given event type.
2464 * @param event A jQuery.Event object.
2465 * @param extraParameters Additional parameters to pass along to the event handler.
2467 trigger(event: JQueryEventObject, extraParameters?: any[]|Object): JQuery;
2470 * Execute all handlers attached to an element for an event.
2472 * @param eventType A string containing a JavaScript event type, such as click or submit.
2473 * @param extraParameters An array of additional parameters to pass along to the event handler.
2475 triggerHandler(eventType: string, ...extraParameters: any[]): Object;
2478 * Remove a previously-attached event handler from the elements.
2480 * @param eventType A string containing a JavaScript event type, such as click or submit.
2481 * @param handler The function that is to be no longer executed.
2483 unbind(eventType?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2485 * Remove a previously-attached event handler from the elements.
2487 * @param eventType A string containing a JavaScript event type, such as click or submit.
2488 * @param fls Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ).
2490 unbind(eventType: string, fls: boolean): JQuery;
2492 * Remove a previously-attached event handler from the elements.
2494 * @param evt A JavaScript event object as passed to an event handler.
2496 unbind(evt: any): JQuery;
2499 * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
2501 undelegate(): JQuery;
2503 * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
2505 * @param selector A selector which will be used to filter the event results.
2506 * @param eventType A string containing a JavaScript event type, such as "click" or "keydown"
2507 * @param handler A function to execute at the time the event is triggered.
2509 undelegate(selector: string, eventType: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2511 * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
2513 * @param selector A selector which will be used to filter the event results.
2514 * @param events An object of one or more event types and previously bound functions to unbind from them.
2516 undelegate(selector: string, events: Object): JQuery;
2518 * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
2520 * @param namespace A string containing a namespace to unbind all events from.
2522 undelegate(namespace: string): JQuery;
2525 * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8)
2527 * @param handler A function to execute when the event is triggered.
2529 unload(handler: (eventObject: JQueryEventObject) => any): JQuery;
2531 * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8)
2533 * @param eventData A plain object of data that will be passed to the event handler.
2534 * @param handler A function to execute when the event is triggered.
2536 unload(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2539 * The DOM node context originally passed to jQuery(); if none was passed then context will likely be the document. (DEPRECATED from v1.10)
2546 * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8)
2548 * @param handler A function to execute when the event is triggered.
2550 error(handler: (eventObject: JQueryEventObject) => any): JQuery;
2552 * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8)
2554 * @param eventData A plain object of data that will be passed to the event handler.
2555 * @param handler A function to execute when the event is triggered.
2557 error(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
2560 * Add a collection of DOM elements onto the jQuery stack.
2562 * @param elements An array of elements to push onto the stack and make into a new jQuery object.
2564 pushStack(elements: any[]): JQuery;
2566 * Add a collection of DOM elements onto the jQuery stack.
2568 * @param elements An array of elements to push onto the stack and make into a new jQuery object.
2569 * @param name The name of a jQuery method that generated the array of elements.
2570 * @param arguments The arguments that were passed in to the jQuery method (for serialization).
2572 pushStack(elements: any[], name: string, arguments: any[]): JQuery;
2575 * Insert content, specified by the parameter, after each element in the set of matched elements.
2577 * param content1 HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements.
2578 * param content2 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.
2580 after(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery;
2582 * Insert content, specified by the parameter, after each element in the set of matched elements.
2584 * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
2586 after(func: (index: number, html: string) => string|Element|JQuery): JQuery;
2589 * Insert content, specified by the parameter, to the end of each element in the set of matched elements.
2591 * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.
2592 * param content2 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.
2594 append(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery;
2596 * Insert content, specified by the parameter, to the end of each element in the set of matched elements.
2598 * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
2600 append(func: (index: number, html: string) => string|Element|JQuery): JQuery;
2603 * Insert every element in the set of matched elements to the end of the target.
2605 * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter.
2607 appendTo(target: JQuery|any[]|Element|string): JQuery;
2610 * Insert content, specified by the parameter, before each element in the set of matched elements.
2612 * param content1 HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements.
2613 * param content2 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.
2615 before(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery;
2617 * Insert content, specified by the parameter, before each element in the set of matched elements.
2619 * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
2621 before(func: (index: number, html: string) => string|Element|JQuery): JQuery;
2624 * Create a deep copy of the set of matched elements.
2626 * param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false.
2627 * param deepWithDataAndEvents 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).
2629 clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): JQuery;
2632 * Remove the set of matched elements from the DOM.
2634 * param selector A selector expression that filters the set of matched elements to be removed.
2636 detach(selector?: string): JQuery;
2639 * Remove all child nodes of the set of matched elements from the DOM.
2644 * Insert every element in the set of matched elements after the target.
2646 * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter.
2648 insertAfter(target: JQuery|any[]|Element|Text|string): JQuery;
2651 * Insert every element in the set of matched elements before the target.
2653 * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter.
2655 insertBefore(target: JQuery|any[]|Element|Text|string): JQuery;
2658 * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
2660 * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements.
2661 * param content2 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.
2663 prepend(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery;
2665 * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
2667 * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
2669 prepend(func: (index: number, html: string) => string|Element|JQuery): JQuery;
2672 * Insert every element in the set of matched elements to the beginning of the target.
2674 * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the beginning of the element(s) specified by this parameter.
2676 prependTo(target: JQuery|any[]|Element|string): JQuery;
2679 * Remove the set of matched elements from the DOM.
2681 * @param selector A selector expression that filters the set of matched elements to be removed.
2683 remove(selector?: string): JQuery;
2686 * Replace each target element with the set of matched elements.
2688 * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace.
2690 replaceAll(target: JQuery|any[]|Element|string): JQuery;
2693 * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
2695 * param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object.
2697 replaceWith(newContent: JQuery|any[]|Element|Text|string): JQuery;
2699 * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
2701 * param func A function that returns content with which to replace the set of matched elements.
2703 replaceWith(func: () => Element|JQuery): JQuery;
2706 * Get the combined text contents of each element in the set of matched elements, including their descendants.
2710 * Set the content of each element in the set of matched elements to the specified text.
2712 * @param text The text to set as the content of each matched element. When Number or Boolean is supplied, it will be converted to a String representation.
2714 text(text: string|number|boolean): JQuery;
2716 * Set the content of each element in the set of matched elements to the specified text.
2718 * @param func A function returning the text content to set. Receives the index position of the element in the set and the old text value as arguments.
2720 text(func: (index: number, text: string) => string): JQuery;
2723 * Retrieve all the elements contained in the jQuery set, as an array.
2728 * Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
2733 * Wrap an HTML structure around each element in the set of matched elements.
2735 * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
2737 wrap(wrappingElement: JQuery|Element|string): JQuery;
2739 * Wrap an HTML structure around each element in the set of matched elements.
2741 * @param func A callback function returning the HTML content or jQuery object to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
2743 wrap(func: (index: number) => string|JQuery): JQuery;
2746 * Wrap an HTML structure around all elements in the set of matched elements.
2748 * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
2750 wrapAll(wrappingElement: JQuery|Element|string): JQuery;
2751 wrapAll(func: (index: number) => string): JQuery;
2754 * Wrap an HTML structure around the content of each element in the set of matched elements.
2756 * @param wrappingElement An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements.
2758 wrapInner(wrappingElement: JQuery|Element|string): JQuery;
2760 * Wrap an HTML structure around the content of each element in the set of matched elements.
2762 * @param func A callback function which generates a structure to wrap around the content of the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
2764 wrapInner(func: (index: number) => string): JQuery;
2767 * Iterate over a jQuery object, executing a function for each matched element.
2769 * @param func A function to execute for each matched element.
2771 each(func: (index: number, elem: Element) => any): JQuery;
2774 * Retrieve one of the elements matched by the jQuery object.
2776 * @param index A zero-based integer indicating which element to retrieve.
2778 get(index: number): HTMLElement;
2780 * Retrieve the elements matched by the jQuery object.
2785 * Search for a given element from among the matched elements.
2789 * Search for a given element from among the matched elements.
2791 * @param selector A selector representing a jQuery collection in which to look for an element.
2793 index(selector: string|JQuery|Element): number;
2796 * The number of elements in the jQuery object.
2800 * A selector representing selector passed to jQuery(), if any, when creating the original set.
2801 * version deprecated: 1.7, removed: 1.9
2804 [index: string]: any;
2805 [index: number]: HTMLElement;
2808 * Add elements to the set of matched elements.
2810 * @param selector A string representing a selector expression to find additional elements to add to the set of matched elements.
2811 * @param context The point in the document at which the selector should begin matching; similar to the context argument of the $(selector, context) method.
2813 add(selector: string, context?: Element): JQuery;
2815 * Add elements to the set of matched elements.
2817 * @param elements One or more elements to add to the set of matched elements.
2819 add(...elements: Element[]): JQuery;
2821 * Add elements to the set of matched elements.
2823 * @param html An HTML fragment to add to the set of matched elements.
2825 add(html: string): JQuery;
2827 * Add elements to the set of matched elements.
2829 * @param obj An existing jQuery object to add to the set of matched elements.
2831 add(obj: JQuery): JQuery;
2834 * Get the children of each element in the set of matched elements, optionally filtered by a selector.
2836 * @param selector A string containing a selector expression to match elements against.
2838 children(selector?: string): JQuery;
2841 * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2843 * @param selector A string containing a selector expression to match elements against.
2845 closest(selector: string): JQuery;
2847 * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2849 * @param selector A string containing a selector expression to match elements against.
2850 * @param context 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.
2852 closest(selector: string, context?: Element): JQuery;
2854 * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2856 * @param obj A jQuery object to match elements against.
2858 closest(obj: JQuery): JQuery;
2860 * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2862 * @param element An element to match elements against.
2864 closest(element: Element): JQuery;
2867 * Get an array of all the elements and selectors matched against the current element up through the DOM tree.
2869 * @param selectors An array or string containing a selector expression to match elements against (can also be a jQuery object).
2870 * @param context 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.
2872 closest(selectors: any, context?: Element): any[];
2875 * Get the children of each element in the set of matched elements, including text and comment nodes.
2880 * End the most recent filtering operation in the current chain and return the set of matched elements to its previous state.
2885 * Reduce the set of matched elements to the one at the specified index.
2887 * @param index An integer indicating the 0-based position of the element. OR An integer indicating the position of the element, counting backwards from the last element in the set.
2890 eq(index: number): JQuery;
2893 * Reduce the set of matched elements to those that match the selector or pass the function's test.
2895 * @param selector A string containing a selector expression to match the current set of elements against.
2897 filter(selector: string): JQuery;
2899 * Reduce the set of matched elements to those that match the selector or pass the function's test.
2901 * @param func A function used as a test for each element in the set. this is the current DOM element.
2903 filter(func: (index: number, element: Element) => any): JQuery;
2905 * Reduce the set of matched elements to those that match the selector or pass the function's test.
2907 * @param element An element to match the current set of elements against.
2909 filter(element: Element): JQuery;
2911 * Reduce the set of matched elements to those that match the selector or pass the function's test.
2913 * @param obj An existing jQuery object to match the current set of elements against.
2915 filter(obj: JQuery): JQuery;
2918 * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
2920 * @param selector A string containing a selector expression to match elements against.
2922 find(selector: string): JQuery;
2924 * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
2926 * @param element An element to match elements against.
2928 find(element: Element): JQuery;
2930 * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
2932 * @param obj A jQuery object to match elements against.
2934 find(obj: JQuery): JQuery;
2937 * Reduce the set of matched elements to the first in the set.
2942 * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
2944 * @param selector A string containing a selector expression to match elements against.
2946 has(selector: string): JQuery;
2948 * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
2950 * @param contained A DOM element to match elements against.
2952 has(contained: Element): JQuery;
2955 * 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.
2957 * @param selector A string containing a selector expression to match elements against.
2959 is(selector: string): boolean;
2961 * 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.
2963 * @param func A function used as a test for the set of elements. It accepts one argument, index, which is the element's index in the jQuery collection.Within the function, this refers to the current DOM element.
2965 is(func: (index: number, element: Element) => boolean): boolean;
2967 * 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.
2969 * @param obj An existing jQuery object to match the current set of elements against.
2971 is(obj: JQuery): boolean;
2973 * 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.
2975 * @param elements One or more elements to match the current set of elements against.
2977 is(elements: any): boolean;
2980 * Reduce the set of matched elements to the final one in the set.
2985 * Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.
2987 * @param callback A function object that will be invoked for each element in the current set.
2989 map(callback: (index: number, domElement: Element) => any): JQuery;
2992 * 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.
2994 * @param selector A string containing a selector expression to match elements against.
2996 next(selector?: string): JQuery;
2999 * Get all following siblings of each element in the set of matched elements, optionally filtered by a selector.
3001 * @param selector A string containing a selector expression to match elements against.
3003 nextAll(selector?: string): JQuery;
3006 * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
3008 * @param selector A string containing a selector expression to indicate where to stop matching following sibling elements.
3009 * @param filter A string containing a selector expression to match elements against.
3011 nextUntil(selector?: string, filter?: string): JQuery;
3013 * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
3015 * @param element A DOM node or jQuery object indicating where to stop matching following sibling elements.
3016 * @param filter A string containing a selector expression to match elements against.
3018 nextUntil(element?: Element, filter?: string): JQuery;
3020 * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
3022 * @param obj A DOM node or jQuery object indicating where to stop matching following sibling elements.
3023 * @param filter A string containing a selector expression to match elements against.
3025 nextUntil(obj?: JQuery, filter?: string): JQuery;
3028 * Remove elements from the set of matched elements.
3030 * @param selector A string containing a selector expression to match elements against.
3032 not(selector: string): JQuery;
3034 * Remove elements from the set of matched elements.
3036 * @param func A function used as a test for each element in the set. this is the current DOM element.
3038 not(func: (index: number, element: Element) => boolean): JQuery;
3040 * Remove elements from the set of matched elements.
3042 * @param elements One or more DOM elements to remove from the matched set.
3044 not(...elements: Element[]): JQuery;
3046 * Remove elements from the set of matched elements.
3048 * @param obj An existing jQuery object to match the current set of elements against.
3050 not(obj: JQuery): JQuery;
3053 * Get the closest ancestor element that is positioned.
3055 offsetParent(): JQuery;
3058 * Get the parent of each element in the current set of matched elements, optionally filtered by a selector.
3060 * @param selector A string containing a selector expression to match elements against.
3062 parent(selector?: string): JQuery;
3065 * Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector.
3067 * @param selector A string containing a selector expression to match elements against.
3069 parents(selector?: string): JQuery;
3072 * 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.
3074 * @param selector A string containing a selector expression to indicate where to stop matching ancestor elements.
3075 * @param filter A string containing a selector expression to match elements against.
3077 parentsUntil(selector?: string, filter?: string): JQuery;
3079 * 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.
3081 * @param element A DOM node or jQuery object indicating where to stop matching ancestor elements.
3082 * @param filter A string containing a selector expression to match elements against.
3084 parentsUntil(element?: Element, filter?: string): JQuery;
3086 * 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.
3088 * @param obj A DOM node or jQuery object indicating where to stop matching ancestor elements.
3089 * @param filter A string containing a selector expression to match elements against.
3091 parentsUntil(obj?: JQuery, filter?: string): JQuery;
3094 * Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector.
3096 * @param selector A string containing a selector expression to match elements against.
3098 prev(selector?: string): JQuery;
3101 * Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector.
3103 * @param selector A string containing a selector expression to match elements against.
3105 prevAll(selector?: string): JQuery;
3108 * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
3110 * @param selector A string containing a selector expression to indicate where to stop matching preceding sibling elements.
3111 * @param filter A string containing a selector expression to match elements against.
3113 prevUntil(selector?: string, filter?: string): JQuery;
3115 * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
3117 * @param element A DOM node or jQuery object indicating where to stop matching preceding sibling elements.
3118 * @param filter A string containing a selector expression to match elements against.
3120 prevUntil(element?: Element, filter?: string): JQuery;
3122 * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
3124 * @param obj A DOM node or jQuery object indicating where to stop matching preceding sibling elements.
3125 * @param filter A string containing a selector expression to match elements against.
3127 prevUntil(obj?: JQuery, filter?: string): JQuery;
3130 * Get the siblings of each element in the set of matched elements, optionally filtered by a selector.
3132 * @param selector A string containing a selector expression to match elements against.
3134 siblings(selector?: string): JQuery;
3137 * Reduce the set of matched elements to a subset specified by a range of indices.
3139 * @param start 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.
3140 * @param end 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.
3142 slice(start: number, end?: number): JQuery;
3145 * Show the queue of functions to be executed on the matched elements.
3147 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
3149 queue(queueName?: string): any[];
3151 * Manipulate the queue of functions to be executed, once for each matched element.
3153 * @param newQueue An array of functions to replace the current queue contents.
3155 queue(newQueue: Function[]): JQuery;
3157 * Manipulate the queue of functions to be executed, once for each matched element.
3159 * @param callback The new function to add to the queue, with a function to call that will dequeue the next item.
3161 queue(callback: Function): JQuery;
3163 * Manipulate the queue of functions to be executed, once for each matched element.
3165 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
3166 * @param newQueue An array of functions to replace the current queue contents.
3168 queue(queueName: string, newQueue: Function[]): JQuery;
3170 * Manipulate the queue of functions to be executed, once for each matched element.
3172 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
3173 * @param callback The new function to add to the queue, with a function to call that will dequeue the next item.
3175 queue(queueName: string, callback: Function): JQuery;
3177 declare module "jquery" {
3180 declare var jQuery: JQueryStatic;
3181 declare var $: JQueryStatic;