1 // Type definitions for jQuery 1.10.x / 2.0.x
2 // Project: http://jquery.com/
3 // 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>
4 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6 /* *****************************************************************************
7 Copyright (c) Microsoft Corporation. All rights reserved.
8 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
9 this file except in compliance with the License. You may obtain a copy of the
10 License at http://www.apache.org/licenses/LICENSE-2.0
12 THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
13 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
14 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
15 MERCHANTABLITY OR NON-INFRINGEMENT.
17 See the Apache Version 2.0 License for specific language governing permissions
18 and limitations under the License.
19 ***************************************************************************** */
23 * Interface for the AJAX setting that will configure the AJAX request
25 interface JQueryAjaxSettings {
27 * 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.
31 * 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().
35 * 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.
37 beforeSend? (jqXHR: JQueryXHR, settings: JQueryAjaxSettings): any;
39 * 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.
43 * 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.
45 complete? (jqXHR: JQueryXHR, textStatus: string): any;
47 * An object of string/regular-expression pairs that determine how jQuery will parse the response, given its content type. (version added: 1.5)
49 contents?: { [key: string]: any; };
50 //According to jQuery.ajax source code, ajax's option actually allows contentType to set to "false"
51 // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/742
53 * 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.
57 * 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).
61 * 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)
63 converters?: { [key: string]: any; };
65 * 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)
67 crossDomain?: boolean;
69 * 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).
73 * 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.
75 dataFilter? (data: any, ty: any): any;
77 * 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).
81 * 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.
83 error? (jqXHR: JQueryXHR, textStatus: string, errorThrown: string): any;
85 * 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.
89 * 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)
91 headers?: { [key: string]: any; };
93 * 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.
97 * 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)
101 * 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" }
105 * 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.
109 * The HTTP method to use for the request (e.g. "POST", "GET", "PUT"). (version added: 1.9.0)
113 * A mime type to override the XHR mime type. (version added: 1.5.1)
117 * A password to be used with XMLHttpRequest in response to an HTTP access authentication request.
121 * 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.
123 processData?: boolean;
125 * 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.
127 scriptCharset?: string;
129 * 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)
131 statusCode?: { [key: string]: any; };
133 * 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.
135 success? (data: any, textStatus: string, jqXHR: JQueryXHR): any;
137 * 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.
141 * Set this to true if you wish to use the traditional style of param serialization.
143 traditional?: boolean;
145 * 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.
149 * A string containing the URL to which the request is sent.
153 * A username to be used with XMLHttpRequest in response to an HTTP access authentication request.
157 * 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.
161 * 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)
163 xhrFields?: { [key: string]: any; };
167 * Interface for the jqXHR object
169 interface JQueryXHR extends XMLHttpRequest, JQueryPromise<any> {
171 * 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).
173 overrideMimeType(mimeType: string): any;
175 * Cancel the request.
177 * @param statusText A string passed as the textStatus parameter for the done callback. Default value: "canceled"
179 abort(statusText?: string): void;
181 * 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.
183 then<R>(doneCallback: (data: any, textStatus: string, jqXHR: JQueryXHR) => R, failCallback?: (jqXHR: JQueryXHR, textStatus: string, errorThrown: any) => void): JQueryPromise<R>;
185 * Property containing the parsed response if the response Content-Type is json
189 * A function to be called if the request fails.
191 error(xhr: JQueryXHR, textStatus: string, errorThrown: string): void;
195 * Interface for the JQuery callback
197 interface JQueryCallback {
199 * Add a callback or a collection of callbacks to a callback list.
201 * @param callbacks A function, or array of functions, that are to be added to the callback list.
203 add(callbacks: Function): JQueryCallback;
205 * Add a callback or a collection of callbacks to a callback list.
207 * @param callbacks A function, or array of functions, that are to be added to the callback list.
209 add(callbacks: Function[]): JQueryCallback;
212 * Disable a callback list from doing anything more.
214 disable(): JQueryCallback;
217 * Determine if the callbacks list has been disabled.
222 * Remove all of the callbacks from a list.
224 empty(): JQueryCallback;
227 * Call all of the callbacks with the given arguments
229 * @param arguments The argument or list of arguments to pass back to the callback list.
231 fire(...arguments: any[]): JQueryCallback;
234 * Determine if the callbacks have already been called at least once.
239 * Call all callbacks in a list with the given context and arguments.
241 * @param context A reference to the context in which the callbacks in the list should be fired.
242 * @param arguments An argument, or array of arguments, to pass to the callbacks in the list.
244 fireWith(context?: any, args?: any[]): JQueryCallback;
247 * Determine whether a supplied callback is in a list
249 * @param callback The callback to search for.
251 has(callback: Function): boolean;
254 * Lock a callback list in its current state.
256 lock(): JQueryCallback;
259 * Determine if the callbacks list has been locked.
264 * Remove a callback or a collection of callbacks from a callback list.
266 * @param callbacks A function, or array of functions, that are to be removed from the callback list.
268 remove(callbacks: Function): JQueryCallback;
270 * Remove a callback or a collection of callbacks from a callback list.
272 * @param callbacks A function, or array of functions, that are to be removed from the callback list.
274 remove(callbacks: Function[]): JQueryCallback;
278 * Allows jQuery Promises to interop with non-jQuery promises
280 interface JQueryGenericPromise<T> {
282 * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
284 * @param doneFilter A function that is called when the Deferred is resolved.
285 * @param failFilter An optional function that is called when the Deferred is rejected.
287 then<U>(doneFilter: (value?: T, ...values: any[]) => U|JQueryPromise<U>, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise<U>;
290 * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
292 * @param doneFilter A function that is called when the Deferred is resolved.
293 * @param failFilter An optional function that is called when the Deferred is rejected.
295 then(doneFilter: (value?: T, ...values: any[]) => void, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise<void>;
299 * Interface for the JQuery promise/deferred callbacks
301 interface JQueryPromiseCallback<T> {
302 (value?: T, ...args: any[]): void;
305 interface JQueryPromiseOperator<T, U> {
306 (callback1: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...callbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<U>;
310 * Interface for the JQuery promise, part of callbacks
312 interface JQueryPromise<T> extends JQueryGenericPromise<T> {
314 * Determine the current state of a Deferred object.
318 * Add handlers to be called when the Deferred object is either resolved or rejected.
320 * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected.
321 * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected.
323 always(alwaysCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...alwaysCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<T>;
325 * Add handlers to be called when the Deferred object is resolved.
327 * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved.
328 * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved.
330 done(doneCallback1?: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...doneCallbackN: Array<JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[]>): JQueryPromise<T>;
332 * Add handlers to be called when the Deferred object is rejected.
334 * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected.
335 * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected.
337 fail(failCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...failCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<T>;
339 * Add handlers to be called when the Deferred object generates progress notifications.
341 * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications.
343 progress(progressCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...progressCallbackN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<T>;
345 // Deprecated - given no typings
346 pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise<any>;
349 * Return a Deferred's Promise object.
351 * @param target Object onto which the promise methods have to be attached
353 promise(target?: any): JQueryPromise<T>;
357 * Interface for the JQuery deferred, part of callbacks
359 interface JQueryDeferred<T> extends JQueryGenericPromise<T> {
361 * Determine the current state of a Deferred object.
365 * Add handlers to be called when the Deferred object is either resolved or rejected.
367 * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected.
368 * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected.
370 always(alwaysCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...alwaysCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryDeferred<T>;
372 * Add handlers to be called when the Deferred object is resolved.
374 * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved.
375 * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved.
377 done(doneCallback1?: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...doneCallbackN: Array<JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[]>): JQueryDeferred<T>;
379 * Add handlers to be called when the Deferred object is rejected.
381 * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected.
382 * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected.
384 fail(failCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...failCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryDeferred<T>;
386 * Add handlers to be called when the Deferred object generates progress notifications.
388 * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications.
390 progress(progressCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...progressCallbackN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryDeferred<T>;
393 * Call the progressCallbacks on a Deferred object with the given args.
395 * @param args Optional arguments that are passed to the progressCallbacks.
397 notify(value?: any, ...args: any[]): JQueryDeferred<T>;
400 * Call the progressCallbacks on a Deferred object with the given context and args.
402 * @param context Context passed to the progressCallbacks as the this object.
403 * @param args Optional arguments that are passed to the progressCallbacks.
405 notifyWith(context: any, value?: any[]): JQueryDeferred<T>;
408 * Reject a Deferred object and call any failCallbacks with the given args.
410 * @param args Optional arguments that are passed to the failCallbacks.
412 reject(value?: any, ...args: any[]): JQueryDeferred<T>;
414 * Reject a Deferred object and call any failCallbacks with the given context and args.
416 * @param context Context passed to the failCallbacks as the this object.
417 * @param args An optional array of arguments that are passed to the failCallbacks.
419 rejectWith(context: any, value?: any[]): JQueryDeferred<T>;
422 * Resolve a Deferred object and call any doneCallbacks with the given args.
424 * @param value First argument passed to doneCallbacks.
425 * @param args Optional subsequent arguments that are passed to the doneCallbacks.
427 resolve(value?: T, ...args: any[]): JQueryDeferred<T>;
430 * Resolve a Deferred object and call any doneCallbacks with the given context and args.
432 * @param context Context passed to the doneCallbacks as the this object.
433 * @param args An optional array of arguments that are passed to the doneCallbacks.
435 resolveWith(context: any, value?: T[]): JQueryDeferred<T>;
438 * Return a Deferred's Promise object.
440 * @param target Object onto which the promise methods have to be attached
442 promise(target?: any): JQueryPromise<T>;
444 // Deprecated - given no typings
445 pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise<any>;
449 * Interface of the JQuery extension of the W3C event object
451 interface BaseJQueryEventObject extends Event {
452 currentTarget: Element;
454 delegateTarget: Element;
455 isDefaultPrevented(): boolean;
456 isImmediatePropagationStopped(): boolean;
457 isPropagationStopped(): boolean;
459 originalEvent: Event;
460 preventDefault(): any;
461 relatedTarget: Element;
463 stopImmediatePropagation(): void;
464 stopPropagation(): void;
472 interface JQueryInputEventObject extends BaseJQueryEventObject {
479 interface JQueryMouseEventObject extends JQueryInputEventObject {
491 interface JQueryKeyEventObject extends JQueryInputEventObject {
498 interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject{
502 Collection of properties of the current browser
505 interface JQuerySupport {
508 changeBubbles?: boolean;
509 checkClone?: boolean;
513 hrefNormalized?: boolean;
514 htmlSerialize?: boolean;
515 leadingWhitespace?: boolean;
516 noCloneChecked?: boolean;
517 noCloneEvent?: boolean;
519 optDisabled?: boolean;
520 optSelected?: boolean;
521 scriptEval? (): boolean;
523 submitBubbles?: boolean;
527 interface JQueryParam {
529 * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
531 * @param obj An array or object to serialize.
536 * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
538 * @param obj An array or object to serialize.
539 * @param traditional A Boolean indicating whether to perform a traditional "shallow" serialization.
541 (obj: any, traditional: boolean): string;
545 * The interface used to construct jQuery events (with $.Event). It is
546 * defined separately instead of inline in JQueryStatic to allow
547 * overriding the construction function with specific strings
548 * returning specific event objects.
550 interface JQueryEventConstructor {
551 (name: string, eventProperties?: any): JQueryEventObject;
552 new (name: string, eventProperties?: any): JQueryEventObject;
556 * The interface used to specify coordinates.
558 interface JQueryCoordinates {
564 * Elements in the array returned by serializeArray()
566 interface JQuerySerializeArrayElement {
571 interface JQueryAnimationOptions {
573 * A string or number determining how long the animation will run.
577 * A string indicating which easing function to use for the transition.
581 * A function to call once the animation is complete.
585 * 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.
587 step?: (now: number, tween: any) => any;
589 * 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)
591 progress?: (animation: JQueryPromise<any>, progress: number, remainingMs: number) => any;
593 * A function to call when the animation begins. (version added: 1.8)
595 start?: (animation: JQueryPromise<any>) => any;
597 * A function to be called when the animation completes (its Promise object is resolved). (version added: 1.8)
599 done?: (animation: JQueryPromise<any>, jumpedToEnd: boolean) => any;
601 * A function to be called when the animation fails to complete (its Promise object is rejected). (version added: 1.8)
603 fail?: (animation: JQueryPromise<any>, jumpedToEnd: boolean) => any;
605 * 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)
607 always?: (animation: JQueryPromise<any>, jumpedToEnd: boolean) => any;
609 * 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.
613 * A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. (version added: 1.4)
615 specialEasing?: Object;
618 interface JQueryEasingFunction {
619 ( percent: number ): number;
622 interface JQueryEasingFunctions {
623 [ name: string ]: JQueryEasingFunction;
624 linear: JQueryEasingFunction;
625 swing: JQueryEasingFunction;
629 * Static members of jQuery (those on $ and jQuery themselves)
631 interface JQueryStatic {
634 * Perform an asynchronous HTTP (Ajax) request.
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(settings: JQueryAjaxSettings): JQueryXHR;
640 * Perform an asynchronous HTTP (Ajax) request.
642 * @param url A string containing the URL to which the request is sent.
643 * @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().
645 ajax(url: string, settings?: JQueryAjaxSettings): JQueryXHR;
648 * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().
650 * @param dataTypes An optional string containing one or more space-separated dataTypes
651 * @param handler A handler to set default values for future Ajax requests.
653 ajaxPrefilter(dataTypes: string, handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void;
655 * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().
657 * @param handler A handler to set default values for future Ajax requests.
659 ajaxPrefilter(handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void;
661 ajaxSettings: JQueryAjaxSettings;
664 * Set default values for future Ajax requests. Its use is not recommended.
666 * @param options A set of key/value pairs that configure the default Ajax request. All options are optional.
668 ajaxSetup(options: JQueryAjaxSettings): void;
671 * Load data from the server using a HTTP GET request.
673 * @param url A string containing the URL to which the request is sent.
674 * @param success A callback function that is executed if the request succeeds.
675 * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
677 get(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
679 * Load data from the server using a HTTP GET request.
681 * @param url A string containing the URL to which the request is sent.
682 * @param data A plain object or string that is sent to the server with the request.
683 * @param success A callback function that is executed if the request succeeds.
684 * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
686 get(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
688 * Load data from the server using a HTTP GET request.
690 * @param settings The JQueryAjaxSettings to be used for the request
692 get(settings : JQueryAjaxSettings): JQueryXHR;
694 * Load JSON-encoded data from the server using a GET HTTP request.
696 * @param url A string containing the URL to which the request is sent.
697 * @param success A callback function that is executed if the request succeeds.
699 getJSON(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
701 * Load JSON-encoded data from the server using a GET HTTP request.
703 * @param url A string containing the URL to which the request is sent.
704 * @param data A plain object or string that is sent to the server with the request.
705 * @param success A callback function that is executed if the request succeeds.
707 getJSON(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
709 * Load a JavaScript file from the server using a GET HTTP request, then execute it.
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.
714 getScript(url: string, success?: (script: string, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
717 * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
722 * Load data from the server using a HTTP POST request.
724 * @param url A string containing the URL to which the request is sent.
725 * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case.
726 * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
728 post(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
730 * Load data from the server using a HTTP POST request.
732 * @param url A string containing the URL to which the request is sent.
733 * @param data A plain object or string that is sent to the server with the request.
734 * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case.
735 * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
737 post(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
739 * Load data from the server using a HTTP POST request.
741 * @param settings The JQueryAjaxSettings to be used for the request
743 post(settings : JQueryAjaxSettings): JQueryXHR;
745 * A multi-purpose callbacks list object that provides a powerful way to manage callback lists.
747 * @param flags An optional list of space-separated flags that change how the callback list behaves.
749 Callbacks(flags?: string): JQueryCallback;
752 * Holds or releases the execution of jQuery's ready event.
754 * @param hold Indicates whether the ready hold is being requested or released
756 holdReady(hold: boolean): void;
759 * Accepts a string containing a CSS selector which is then used to match a set of elements.
761 * @param selector A string containing a selector expression
762 * @param context A DOM Element, Document, or jQuery to use as context
764 (selector: string, context?: Element|JQuery): JQuery;
767 * Accepts a string containing a CSS selector which is then used to match a set of elements.
769 * @param element A DOM element to wrap in a jQuery object.
771 (element: Element): JQuery;
774 * Accepts a string containing a CSS selector which is then used to match a set of elements.
776 * @param elementArray An array containing a set of DOM elements to wrap in a jQuery object.
778 (elementArray: Element[]): JQuery;
781 * Binds a function to be executed when the DOM has finished loading.
783 * @param callback A function to execute after the DOM is ready.
785 (callback: (jQueryAlias?: JQueryStatic) => any): JQuery;
788 * Accepts a string containing a CSS selector which is then used to match a set of elements.
790 * @param object A plain object to wrap in a jQuery object.
792 (object: {}): JQuery;
795 * Accepts a string containing a CSS selector which is then used to match a set of elements.
797 * @param object An existing jQuery object to clone.
799 (object: JQuery): JQuery;
802 * Specify a function to execute when the DOM is fully loaded.
807 * Creates DOM elements on the fly from the provided string of raw HTML.
809 * @param html A string of HTML to create on the fly. Note that this parses HTML, not XML.
810 * @param ownerDocument A document in which the new elements will be created.
812 (html: string, ownerDocument?: Document): JQuery;
815 * Creates DOM elements on the fly from the provided string of raw HTML.
817 * @param html A string defining a single, standalone, HTML element (e.g. <div/> or <div></div>).
818 * @param attributes An object of attributes, events, and methods to call on the newly-created element.
820 (html: string, attributes: Object): JQuery;
823 * Relinquish jQuery's control of the $ variable.
825 * @param removeAll A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself).
827 noConflict(removeAll?: boolean): JQueryStatic;
830 * Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events.
832 * @param deferreds One or more Deferred objects, or plain JavaScript objects.
834 when<T>(...deferreds: Array<T|JQueryPromise<T>/* as JQueryDeferred<T> */>): JQueryPromise<T>;
837 * Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties.
839 cssHooks: { [key: string]: any; };
843 * Store arbitrary data associated with the specified element. Returns the value that was set.
845 * @param element The DOM element to associate with the data.
846 * @param key A string naming the piece of data to set.
847 * @param value The new data value.
849 data<T>(element: Element, key: string, value: T): T;
851 * 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.
853 * @param element The DOM element to associate with the data.
854 * @param key A string naming the piece of data to set.
856 data(element: Element, key: string): any;
858 * 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.
860 * @param element The DOM element to associate with the data.
862 data(element: Element): any;
865 * Execute the next function on the queue for the matched element.
867 * @param element A DOM element from which to remove and execute a queued function.
868 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
870 dequeue(element: Element, queueName?: string): void;
873 * Determine whether an element has any jQuery data associated with it.
875 * @param element A DOM element to be checked for data.
877 hasData(element: Element): boolean;
880 * Show the queue of functions to be executed on the matched element.
882 * @param element A DOM element to inspect for an attached queue.
883 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
885 queue(element: Element, queueName?: string): any[];
887 * Manipulate the queue of functions to be executed on the matched element.
889 * @param element A DOM element where the array of queued functions is attached.
890 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
891 * @param newQueue An array of functions to replace the current queue contents.
893 queue(element: Element, queueName: string, newQueue: Function[]): JQuery;
895 * Manipulate the queue of functions to be executed on the matched element.
897 * @param element A DOM element on which to add a queued function.
898 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
899 * @param callback The new function to add to the queue.
901 queue(element: Element, queueName: string, callback: Function): JQuery;
904 * Remove a previously-stored piece of data.
906 * @param element A DOM element from which to remove data.
907 * @param name A string naming the piece of data to remove.
909 removeData(element: Element, name?: string): JQuery;
912 * 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.
914 * @param beforeStart A function that is called just before the constructor returns.
916 Deferred<T>(beforeStart?: (deferred: JQueryDeferred<T>) => any): JQueryDeferred<T>;
922 easing: JQueryEasingFunctions;
927 * The rate (in milliseconds) at which animations fire.
931 speeds: { slow: number; fast: number; };
933 * Globally disable all animations.
940 * Takes a function and returns a new one that will always have a particular context.
942 * @param fnction The function whose context will be changed.
943 * @param context The object to which the context (this) of the function should be set.
944 * @param additionalArguments Any number of arguments to be passed to the function referenced in the function argument.
946 proxy(fnction: (...args: any[]) => any, context: Object, ...additionalArguments: any[]): any;
948 * Takes a function and returns a new one that will always have a particular context.
950 * @param context The object to which the context (this) of the function should be set.
951 * @param name The name of the function whose context will be changed (should be a property of the context object).
952 * @param additionalArguments Any number of arguments to be passed to the function named in the name argument.
954 proxy(context: Object, name: string, ...additionalArguments: any[]): any;
956 Event: JQueryEventConstructor;
959 * Takes a string and throws an exception containing it.
961 * @param message The message to send out.
963 error(message: any): JQuery;
966 fn: any; //TODO: Decide how we want to type this
971 support: JQuerySupport;
974 * Check to see if a DOM element is a descendant of another DOM element.
976 * @param container The DOM element that may contain the other element.
977 * @param contained The DOM element that may be contained by (a descendant of) the other element.
979 contains(container: Element, contained: Element): boolean;
982 * 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.
984 * @param collection The object or array to iterate over.
985 * @param callback The function that will be executed on every object.
989 callback: (indexInArray: number, valueOfElement: T) => any
993 * 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.
995 * @param collection The object or array to iterate over.
996 * @param callback The function that will be executed on every object.
1000 callback: (indexInArray: any, valueOfElement: any) => any
1004 * Merge the contents of two or more objects together into the first object.
1006 * @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.
1007 * @param object1 An object containing additional properties to merge in.
1008 * @param objectN Additional objects containing properties to merge in.
1010 extend(target: any, object1?: any, ...objectN: any[]): any;
1012 * Merge the contents of two or more objects together into the first object.
1014 * @param deep If true, the merge becomes recursive (aka. deep copy).
1015 * @param target The object to extend. It will receive the new properties.
1016 * @param object1 An object containing additional properties to merge in.
1017 * @param objectN Additional objects containing properties to merge in.
1019 extend(deep: boolean, target: any, object1?: any, ...objectN: any[]): any;
1022 * Execute some JavaScript code globally.
1024 * @param code The JavaScript code to execute.
1026 globalEval(code: string): any;
1029 * Finds the elements of an array which satisfy a filter function. The original array is not affected.
1031 * @param array The array to search through.
1032 * @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.
1033 * @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.
1035 grep<T>(array: T[], func: (elementOfArray?: T, indexInArray?: number) => boolean, invert?: boolean): T[];
1038 * Search for a specified value within an array and return its index (or -1 if not found).
1040 * @param value The value to search for.
1041 * @param array An array through which to search.
1042 * @param fromIndex he index of the array at which to begin the search. The default is 0, which will search the whole array.
1044 inArray<T>(value: T, array: T[], fromIndex?: number): number;
1047 * Determine whether the argument is an array.
1049 * @param obj Object to test whether or not it is an array.
1051 isArray(obj: any): boolean;
1053 * Check to see if an object is empty (contains no enumerable properties).
1055 * @param obj The object that will be checked to see if it's empty.
1057 isEmptyObject(obj: any): boolean;
1059 * Determine if the argument passed is a Javascript function object.
1061 * @param obj Object to test whether or not it is a function.
1063 isFunction(obj: any): boolean;
1065 * Determines whether its argument is a number.
1067 * @param obj The value to be tested.
1069 isNumeric(value: any): boolean;
1071 * Check to see if an object is a plain object (created using "{}" or "new Object").
1073 * @param obj The object that will be checked to see if it's a plain object.
1075 isPlainObject(obj: any): boolean;
1077 * Determine whether the argument is a window.
1079 * @param obj Object to test whether or not it is a window.
1081 isWindow(obj: any): boolean;
1083 * Check to see if a DOM node is within an XML document (or is an XML document).
1085 * @param node he DOM node that will be checked to see if it's in an XML document.
1087 isXMLDoc(node: Node): boolean;
1090 * Convert an array-like object into a true JavaScript array.
1092 * @param obj Any object to turn into a native Array.
1094 makeArray(obj: any): any[];
1097 * Translate all items in an array or object to new array of items.
1099 * @param array The Array to translate.
1100 * @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.
1102 map<T, U>(array: T[], callback: (elementOfArray?: T, indexInArray?: number) => U): U[];
1104 * Translate all items in an array or object to new array of items.
1106 * @param arrayOrObject The Array or Object to translate.
1107 * @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.
1109 map(arrayOrObject: any, callback: (value?: any, indexOrKey?: any) => any): any;
1112 * Merge the contents of two arrays together into the first array.
1114 * @param first The first array to merge, the elements of second added.
1115 * @param second The second array to merge into the first, unaltered.
1117 merge<T>(first: T[], second: T[]): T[];
1120 * An empty function.
1125 * Return a number representing the current time.
1130 * Takes a well-formed JSON string and returns the resulting JavaScript object.
1132 * @param json The JSON string to parse.
1134 parseJSON(json: string): any;
1137 * Parses a string into an XML document.
1139 * @param data a well-formed XML string to be parsed
1141 parseXML(data: string): XMLDocument;
1144 * Remove the whitespace from the beginning and end of a string.
1146 * @param str Remove the whitespace from the beginning and end of a string.
1148 trim(str: string): string;
1151 * Determine the internal JavaScript [[Class]] of an object.
1153 * @param obj Object to get the internal JavaScript [[Class]] of.
1155 type(obj: any): string;
1158 * 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.
1160 * @param array The Array of DOM elements.
1162 unique(array: Element[]): Element[];
1165 * Parses a string into an array of DOM nodes.
1167 * @param data HTML string to be parsed
1168 * @param context DOM element to serve as the context in which the HTML fragment will be created
1169 * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string
1171 parseHTML(data: string, context?: HTMLElement, keepScripts?: boolean): any[];
1174 * Parses a string into an array of DOM nodes.
1176 * @param data HTML string to be parsed
1177 * @param context DOM element to serve as the context in which the HTML fragment will be created
1178 * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string
1180 parseHTML(data: string, context?: Document, keepScripts?: boolean): any[];
1184 * The jQuery instance members
1188 * Register a handler to be called when Ajax requests complete. This is an AjaxEvent.
1190 * @param handler The function to be invoked.
1192 ajaxComplete(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: any) => any): JQuery;
1194 * Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event.
1196 * @param handler The function to be invoked.
1198 ajaxError(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxSettings: JQueryAjaxSettings, thrownError: any) => any): JQuery;
1200 * Attach a function to be executed before an Ajax request is sent. This is an Ajax Event.
1202 * @param handler The function to be invoked.
1204 ajaxSend(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxOptions: JQueryAjaxSettings) => any): JQuery;
1206 * Register a handler to be called when the first Ajax request begins. This is an Ajax Event.
1208 * @param handler The function to be invoked.
1210 ajaxStart(handler: () => any): JQuery;
1212 * Register a handler to be called when all Ajax requests have completed. This is an Ajax Event.
1214 * @param handler The function to be invoked.
1216 ajaxStop(handler: () => any): JQuery;
1218 * Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.
1220 * @param handler The function to be invoked.
1222 ajaxSuccess(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: JQueryAjaxSettings) => any): JQuery;
1225 * Load data from the server and place the returned HTML into the matched element.
1227 * @param url A string containing the URL to which the request is sent.
1228 * @param data A plain object or string that is sent to the server with the request.
1229 * @param complete A callback function that is executed when the request completes.
1231 load(url: string, data?: string|Object, complete?: (responseText: string, textStatus: string, XMLHttpRequest: XMLHttpRequest) => any): JQuery;
1234 * Encode a set of form elements as a string for submission.
1236 serialize(): string;
1238 * Encode a set of form elements as an array of names and values.
1240 serializeArray(): JQuerySerializeArrayElement[];
1243 * Adds the specified class(es) to each of the set of matched elements.
1245 * @param className One or more space-separated classes to be added to the class attribute of each matched element.
1247 addClass(className: string): JQuery;
1249 * Adds the specified class(es) to each of the set of matched elements.
1251 * @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.
1253 addClass(func: (index: number, className: string) => string): JQuery;
1256 * Add the previous set of elements on the stack to the current set, optionally filtered by a selector.
1258 addBack(selector?: string): JQuery;
1261 * Get the value of an attribute for the first element in the set of matched elements.
1263 * @param attributeName The name of the attribute to get.
1265 attr(attributeName: string): string;
1267 * Set one or more attributes for the set of matched elements.
1269 * @param attributeName The name of the attribute to set.
1270 * @param value A value to set for the attribute.
1272 attr(attributeName: string, value: string|number): JQuery;
1274 * Set one or more attributes for the set of matched elements.
1276 * @param attributeName The name of the attribute to set.
1277 * @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.
1279 attr(attributeName: string, func: (index: number, attr: string) => string|number): JQuery;
1281 * Set one or more attributes for the set of matched elements.
1283 * @param attributes An object of attribute-value pairs to set.
1285 attr(attributes: Object): JQuery;
1288 * Determine whether any of the matched elements are assigned the given class.
1290 * @param className The class name to search for.
1292 hasClass(className: string): boolean;
1295 * Get the HTML contents of the first element in the set of matched elements.
1299 * Set the HTML contents of each element in the set of matched elements.
1301 * @param htmlString A string of HTML to set as the content of each matched element.
1303 html(htmlString: string): JQuery;
1305 * Set the HTML contents of each element in the set of matched elements.
1307 * @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.
1309 html(func: (index: number, oldhtml: string) => string): JQuery;
1311 * Set the HTML contents of each element in the set of matched elements.
1313 * @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.
1317 * Get the value of a property for the first element in the set of matched elements.
1319 * @param propertyName The name of the property to get.
1321 prop(propertyName: string): any;
1323 * Set one or more properties for the set of matched elements.
1325 * @param propertyName The name of the property to set.
1326 * @param value A value to set for the property.
1328 prop(propertyName: string, value: string|number|boolean): JQuery;
1330 * Set one or more properties for the set of matched elements.
1332 * @param properties An object of property-value pairs to set.
1334 prop(properties: Object): JQuery;
1336 * Set one or more properties for the set of matched elements.
1338 * @param propertyName The name of the property to set.
1339 * @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.
1341 prop(propertyName: string, func: (index: number, oldPropertyValue: any) => any): JQuery;
1344 * Remove an attribute from each element in the set of matched elements.
1346 * @param attributeName An attribute to remove; as of version 1.7, it can be a space-separated list of attributes.
1348 removeAttr(attributeName: string): JQuery;
1351 * Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
1353 * @param className One or more space-separated classes to be removed from the class attribute of each matched element.
1355 removeClass(className?: string): JQuery;
1357 * Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
1359 * @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.
1361 removeClass(func: (index: number, className: string) => string): JQuery;
1364 * Remove a property for the set of matched elements.
1366 * @param propertyName The name of the property to remove.
1368 removeProp(propertyName: string): JQuery;
1371 * 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.
1373 * @param className One or more class names (separated by spaces) to be toggled for each element in the matched set.
1374 * @param swtch A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed.
1376 toggleClass(className: string, swtch?: boolean): JQuery;
1378 * 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.
1380 * @param swtch A boolean value to determine whether the class should be added or removed.
1382 toggleClass(swtch?: boolean): JQuery;
1384 * 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.
1386 * @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.
1387 * @param swtch A boolean value to determine whether the class should be added or removed.
1389 toggleClass(func: (index: number, className: string, swtch: boolean) => string, swtch?: boolean): JQuery;
1392 * Get the current value of the first element in the set of matched elements.
1396 * Set the value of each element in the set of matched elements.
1398 * @param value A string of text, an array of strings or number corresponding to the value of each matched element to set as selected/checked.
1400 val(value: string|string[]|number): JQuery;
1402 * Set the value of each element in the set of matched elements.
1404 * @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.
1406 val(func: (index: number, value: string) => string): JQuery;
1410 * Get the value of style properties for the first element in the set of matched elements.
1412 * @param propertyName A CSS property.
1414 css(propertyName: string): string;
1416 * Set one or more CSS properties for the set of matched elements.
1418 * @param propertyName A CSS property name.
1419 * @param value A value to set for the property.
1421 css(propertyName: string, value: string|number): JQuery;
1423 * Set one or more CSS properties for the set of matched elements.
1425 * @param propertyName A CSS property name.
1426 * @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.
1428 css(propertyName: string, value: (index: number, value: string) => string|number): JQuery;
1430 * Set one or more CSS properties for the set of matched elements.
1432 * @param properties An object of property-value pairs to set.
1434 css(properties: Object): JQuery;
1437 * Get the current computed height for the first element in the set of matched elements.
1441 * Set the CSS height of every matched element.
1443 * @param value An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string).
1445 height(value: number|string): JQuery;
1447 * Set the CSS height of every matched element.
1449 * @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.
1451 height(func: (index: number, height: number) => number|string): JQuery;
1454 * Get the current computed height for the first element in the set of matched elements, including padding but not border.
1456 innerHeight(): number;
1459 * Sets the inner height on elements in the set of matched elements, including padding but not border.
1461 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1463 innerHeight(height: number|string): JQuery;
1466 * Get the current computed width for the first element in the set of matched elements, including padding but not border.
1468 innerWidth(): number;
1471 * Sets the inner width on elements in the set of matched elements, including padding but not border.
1473 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1475 innerWidth(width: number|string): JQuery;
1478 * Get the current coordinates of the first element in the set of matched elements, relative to the document.
1480 offset(): JQueryCoordinates;
1482 * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
1484 * @param coordinates An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
1486 offset(coordinates: JQueryCoordinates): JQuery;
1488 * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
1490 * @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.
1492 offset(func: (index: number, coords: JQueryCoordinates) => JQueryCoordinates): JQuery;
1495 * 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.
1497 * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation.
1499 outerHeight(includeMargin?: boolean): number;
1502 * Sets the outer height on elements in the set of matched elements, including padding and border.
1504 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1506 outerHeight(height: number|string): JQuery;
1509 * Get the current computed width for the first element in the set of matched elements, including padding and border.
1511 * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation.
1513 outerWidth(includeMargin?: boolean): number;
1516 * Sets the outer width on elements in the set of matched elements, including padding and border.
1518 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1520 outerWidth(width: number|string): JQuery;
1523 * Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.
1525 position(): JQueryCoordinates;
1528 * 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.
1530 scrollLeft(): number;
1532 * Set the current horizontal position of the scroll bar for each of the set of matched elements.
1534 * @param value An integer indicating the new position to set the scroll bar to.
1536 scrollLeft(value: number): JQuery;
1539 * 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.
1541 scrollTop(): number;
1543 * Set the current vertical position of the scroll bar for each of the set of matched elements.
1545 * @param value An integer indicating the new position to set the scroll bar to.
1547 scrollTop(value: number): JQuery;
1550 * Get the current computed width for the first element in the set of matched elements.
1554 * Set the CSS width of each element in the set of matched elements.
1556 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1558 width(value: number|string): JQuery;
1560 * Set the CSS width of each element in the set of matched elements.
1562 * @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.
1564 width(func: (index: number, width: number) => number|string): JQuery;
1567 * Remove from the queue all items that have not yet been run.
1569 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
1571 clearQueue(queueName?: string): JQuery;
1574 * Store arbitrary data associated with the matched elements.
1576 * @param key A string naming the piece of data to set.
1577 * @param value The new data value; it can be any Javascript type including Array or Object.
1579 data(key: string, value: any): JQuery;
1581 * 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.
1583 * @param key Name of the data stored.
1585 data(key: string): any;
1587 * Store arbitrary data associated with the matched elements.
1589 * @param obj An object of key-value pairs of data to update.
1591 data(obj: { [key: string]: any; }): JQuery;
1593 * 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.
1598 * Execute the next function on the queue for the matched elements.
1600 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
1602 dequeue(queueName?: string): JQuery;
1605 * Remove a previously-stored piece of data.
1607 * @param name A string naming the piece of data to delete or space-separated string naming the pieces of data to delete.
1609 removeData(name: string): JQuery;
1611 * Remove a previously-stored piece of data.
1613 * @param list An array of strings naming the pieces of data to delete.
1615 removeData(list: string[]): JQuery;
1617 * Remove all previously-stored piece of data.
1619 removeData(): JQuery;
1622 * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.
1624 * @param type The type of queue that needs to be observed. (default: fx)
1625 * @param target Object onto which the promise methods have to be attached
1627 promise(type?: string, target?: Object): JQueryPromise<any>;
1630 * Perform a custom animation of a set of CSS properties.
1632 * @param properties An object of CSS properties and values that the animation will move toward.
1633 * @param duration A string or number determining how long the animation will run.
1634 * @param complete A function to call once the animation is complete.
1636 animate(properties: Object, duration?: string|number, complete?: Function): JQuery;
1638 * Perform a custom animation of a set of CSS properties.
1640 * @param properties An object of CSS properties and values that the animation will move toward.
1641 * @param duration A string or number determining how long the animation will run.
1642 * @param easing A string indicating which easing function to use for the transition. (default: swing)
1643 * @param complete A function to call once the animation is complete.
1645 animate(properties: Object, duration?: string|number, easing?: string, complete?: Function): JQuery;
1647 * Perform a custom animation of a set of CSS properties.
1649 * @param properties An object of CSS properties and values that the animation will move toward.
1650 * @param options A map of additional options to pass to the method.
1652 animate(properties: Object, options: JQueryAnimationOptions): JQuery;
1655 * Set a timer to delay execution of subsequent items in the queue.
1657 * @param duration An integer indicating the number of milliseconds to delay execution of the next item in the queue.
1658 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
1660 delay(duration: number, queueName?: string): JQuery;
1663 * Display the matched elements by fading them to opaque.
1665 * @param duration A string or number determining how long the animation will run.
1666 * @param complete A function to call once the animation is complete.
1668 fadeIn(duration?: number|string, complete?: Function): JQuery;
1670 * Display the matched elements by fading them to opaque.
1672 * @param duration A string or number determining how long the animation will run.
1673 * @param easing A string indicating which easing function to use for the transition.
1674 * @param complete A function to call once the animation is complete.
1676 fadeIn(duration?: number|string, easing?: string, complete?: Function): JQuery;
1678 * Display the matched elements by fading them to opaque.
1680 * @param options A map of additional options to pass to the method.
1682 fadeIn(options: JQueryAnimationOptions): JQuery;
1685 * Hide the matched elements by fading them to transparent.
1687 * @param duration A string or number determining how long the animation will run.
1688 * @param complete A function to call once the animation is complete.
1690 fadeOut(duration?: number|string, complete?: Function): JQuery;
1692 * Hide the matched elements by fading them to transparent.
1694 * @param duration A string or number determining how long the animation will run.
1695 * @param easing A string indicating which easing function to use for the transition.
1696 * @param complete A function to call once the animation is complete.
1698 fadeOut(duration?: number|string, easing?: string, complete?: Function): JQuery;
1700 * Hide the matched elements by fading them to transparent.
1702 * @param options A map of additional options to pass to the method.
1704 fadeOut(options: JQueryAnimationOptions): JQuery;
1707 * Adjust the opacity of the matched elements.
1709 * @param duration A string or number determining how long the animation will run.
1710 * @param opacity A number between 0 and 1 denoting the target opacity.
1711 * @param complete A function to call once the animation is complete.
1713 fadeTo(duration: string|number, opacity: number, complete?: Function): JQuery;
1715 * Adjust the opacity of the matched elements.
1717 * @param duration A string or number determining how long the animation will run.
1718 * @param opacity A number between 0 and 1 denoting the target opacity.
1719 * @param easing A string indicating which easing function to use for the transition.
1720 * @param complete A function to call once the animation is complete.
1722 fadeTo(duration: string|number, opacity: number, easing?: string, complete?: Function): JQuery;
1725 * Display or hide the matched elements by animating their opacity.
1727 * @param duration A string or number determining how long the animation will run.
1728 * @param complete A function to call once the animation is complete.
1730 fadeToggle(duration?: number|string, complete?: Function): JQuery;
1732 * Display or hide the matched elements by animating their opacity.
1734 * @param duration A string or number determining how long the animation will run.
1735 * @param easing A string indicating which easing function to use for the transition.
1736 * @param complete A function to call once the animation is complete.
1738 fadeToggle(duration?: number|string, easing?: string, complete?: Function): JQuery;
1740 * Display or hide the matched elements by animating their opacity.
1742 * @param options A map of additional options to pass to the method.
1744 fadeToggle(options: JQueryAnimationOptions): JQuery;
1747 * Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements.
1749 * @param queue The name of the queue in which to stop animations.
1751 finish(queue?: string): JQuery;
1754 * Hide the matched elements.
1756 * @param duration A string or number determining how long the animation will run.
1757 * @param complete A function to call once the animation is complete.
1759 hide(duration?: number|string, complete?: Function): JQuery;
1761 * Hide the matched elements.
1763 * @param duration A string or number determining how long the animation will run.
1764 * @param easing A string indicating which easing function to use for the transition.
1765 * @param complete A function to call once the animation is complete.
1767 hide(duration?: number|string, easing?: string, complete?: Function): JQuery;
1769 * Hide the matched elements.
1771 * @param options A map of additional options to pass to the method.
1773 hide(options: JQueryAnimationOptions): JQuery;
1776 * Display the matched elements.
1778 * @param duration A string or number determining how long the animation will run.
1779 * @param complete A function to call once the animation is complete.
1781 show(duration?: number|string, complete?: Function): JQuery;
1783 * Display the matched elements.
1785 * @param duration A string or number determining how long the animation will run.
1786 * @param easing A string indicating which easing function to use for the transition.
1787 * @param complete A function to call once the animation is complete.
1789 show(duration?: number|string, easing?: string, complete?: Function): JQuery;
1791 * Display the matched elements.
1793 * @param options A map of additional options to pass to the method.
1795 show(options: JQueryAnimationOptions): JQuery;
1798 * Display the matched elements with a sliding motion.
1800 * @param duration A string or number determining how long the animation will run.
1801 * @param complete A function to call once the animation is complete.
1803 slideDown(duration?: number|string, complete?: Function): JQuery;
1805 * Display the matched elements with a sliding motion.
1807 * @param duration A string or number determining how long the animation will run.
1808 * @param easing A string indicating which easing function to use for the transition.
1809 * @param complete A function to call once the animation is complete.
1811 slideDown(duration?: number|string, easing?: string, complete?: Function): JQuery;
1813 * Display the matched elements with a sliding motion.
1815 * @param options A map of additional options to pass to the method.
1817 slideDown(options: JQueryAnimationOptions): JQuery;
1820 * Display or hide the matched elements with a sliding motion.
1822 * @param duration A string or number determining how long the animation will run.
1823 * @param complete A function to call once the animation is complete.
1825 slideToggle(duration?: number|string, complete?: Function): JQuery;
1827 * Display or hide the matched elements with a sliding motion.
1829 * @param duration A string or number determining how long the animation will run.
1830 * @param easing A string indicating which easing function to use for the transition.
1831 * @param complete A function to call once the animation is complete.
1833 slideToggle(duration?: number|string, easing?: string, complete?: Function): JQuery;
1835 * Display or hide the matched elements with a sliding motion.
1837 * @param options A map of additional options to pass to the method.
1839 slideToggle(options: JQueryAnimationOptions): JQuery;
1842 * Hide the matched elements with a sliding motion.
1844 * @param duration A string or number determining how long the animation will run.
1845 * @param complete A function to call once the animation is complete.
1847 slideUp(duration?: number|string, complete?: Function): JQuery;
1849 * Hide the matched elements with a sliding motion.
1851 * @param duration A string or number determining how long the animation will run.
1852 * @param easing A string indicating which easing function to use for the transition.
1853 * @param complete A function to call once the animation is complete.
1855 slideUp(duration?: number|string, easing?: string, complete?: Function): JQuery;
1857 * Hide the matched elements with a sliding motion.
1859 * @param options A map of additional options to pass to the method.
1861 slideUp(options: JQueryAnimationOptions): JQuery;
1864 * Stop the currently-running animation on the matched elements.
1866 * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false.
1867 * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false.
1869 stop(clearQueue?: boolean, jumpToEnd?: boolean): JQuery;
1871 * Stop the currently-running animation on the matched elements.
1873 * @param queue The name of the queue in which to stop animations.
1874 * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false.
1875 * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false.
1877 stop(queue?: string, clearQueue?: boolean, jumpToEnd?: boolean): JQuery;
1880 * Display or hide the matched elements.
1882 * @param duration A string or number determining how long the animation will run.
1883 * @param complete A function to call once the animation is complete.
1885 toggle(duration?: number|string, complete?: Function): JQuery;
1887 * Display or hide the matched elements.
1889 * @param duration A string or number determining how long the animation will run.
1890 * @param easing A string indicating which easing function to use for the transition.
1891 * @param complete A function to call once the animation is complete.
1893 toggle(duration?: number|string, easing?: string, complete?: Function): JQuery;
1895 * Display or hide the matched elements.
1897 * @param options A map of additional options to pass to the method.
1899 toggle(options: JQueryAnimationOptions): JQuery;
1901 * Display or hide the matched elements.
1903 * @param showOrHide A Boolean indicating whether to show or hide the elements.
1905 toggle(showOrHide: boolean): JQuery;
1908 * Attach a handler to an event for the elements.
1910 * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1911 * @param eventData An object containing data that will be passed to the event handler.
1912 * @param handler A function to execute each time the event is triggered.
1914 bind(eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
1916 * Attach a handler to an event for the elements.
1918 * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1919 * @param handler A function to execute each time the event is triggered.
1921 bind(eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
1923 * Attach a handler to an event for the elements.
1925 * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1926 * @param eventData An object containing data that will be passed to the event handler.
1927 * @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.
1929 bind(eventType: string, eventData: any, preventBubble: boolean): JQuery;
1931 * Attach a handler to an event for the elements.
1933 * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1934 * @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.
1936 bind(eventType: string, preventBubble: boolean): JQuery;
1938 * Attach a handler to an event for the elements.
1940 * @param events An object containing one or more DOM event types and functions to execute for them.
1942 bind(events: any): JQuery;
1945 * Trigger the "blur" event on an element
1949 * Bind an event handler to the "blur" JavaScript event
1951 * @param handler A function to execute each time the event is triggered.
1953 blur(handler: (eventObject: JQueryEventObject) => any): JQuery;
1955 * Bind an event handler to the "blur" JavaScript event
1957 * @param eventData An object containing data that will be passed to the event handler.
1958 * @param handler A function to execute each time the event is triggered.
1960 blur(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
1963 * Trigger the "change" event on an element.
1967 * Bind an event handler to the "change" JavaScript event
1969 * @param handler A function to execute each time the event is triggered.
1971 change(handler: (eventObject: JQueryEventObject) => any): JQuery;
1973 * Bind an event handler to the "change" JavaScript event
1975 * @param eventData An object containing data that will be passed to the event handler.
1976 * @param handler A function to execute each time the event is triggered.
1978 change(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
1981 * Trigger the "click" event on an element.
1985 * Bind an event handler to the "click" JavaScript event
1987 * @param eventData An object containing data that will be passed to the event handler.
1989 click(handler: (eventObject: JQueryEventObject) => any): JQuery;
1991 * Bind an event handler to the "click" JavaScript event
1993 * @param eventData An object containing data that will be passed to the event handler.
1994 * @param handler A function to execute each time the event is triggered.
1996 click(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
1999 * Trigger the "contextmenu" event on an element.
2001 contextmenu(): JQuery;
2003 * Bind an event handler to the "contextmenu" JavaScript event.
2005 * @param handler A function to execute when the event is triggered.
2007 contextmenu(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2009 * Bind an event handler to the "contextmenu" JavaScript event.
2011 * @param eventData An object containing data that will be passed to the event handler.
2012 * @param handler A function to execute when the event is triggered.
2014 contextmenu(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2017 * Trigger the "dblclick" event on an element.
2021 * Bind an event handler to the "dblclick" JavaScript event
2023 * @param handler A function to execute each time the event is triggered.
2025 dblclick(handler: (eventObject: JQueryEventObject) => any): JQuery;
2027 * Bind an event handler to the "dblclick" JavaScript event
2029 * @param eventData An object containing data that will be passed to the event handler.
2030 * @param handler A function to execute each time the event is triggered.
2032 dblclick(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2034 delegate(selector: any, eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
2035 delegate(selector: any, eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
2038 * Trigger the "focus" event on an element.
2042 * Bind an event handler to the "focus" JavaScript event
2044 * @param handler A function to execute each time the event is triggered.
2046 focus(handler: (eventObject: JQueryEventObject) => any): JQuery;
2048 * Bind an event handler to the "focus" JavaScript event
2050 * @param eventData An object containing data that will be passed to the event handler.
2051 * @param handler A function to execute each time the event is triggered.
2053 focus(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2056 * Trigger the "focusin" event on an element.
2060 * Bind an event handler to the "focusin" JavaScript event
2062 * @param handler A function to execute each time the event is triggered.
2064 focusin(handler: (eventObject: JQueryEventObject) => any): JQuery;
2066 * Bind an event handler to the "focusin" JavaScript event
2068 * @param eventData An object containing data that will be passed to the event handler.
2069 * @param handler A function to execute each time the event is triggered.
2071 focusin(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2074 * Trigger the "focusout" event on an element.
2078 * Bind an event handler to the "focusout" JavaScript event
2080 * @param handler A function to execute each time the event is triggered.
2082 focusout(handler: (eventObject: JQueryEventObject) => any): JQuery;
2084 * Bind an event handler to the "focusout" JavaScript event
2086 * @param eventData An object containing data that will be passed to the event handler.
2087 * @param handler A function to execute each time the event is triggered.
2089 focusout(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2092 * Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.
2094 * @param handlerIn A function to execute when the mouse pointer enters the element.
2095 * @param handlerOut A function to execute when the mouse pointer leaves the element.
2097 hover(handlerIn: (eventObject: JQueryEventObject) => any, handlerOut: (eventObject: JQueryEventObject) => any): JQuery;
2099 * Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements.
2101 * @param handlerInOut A function to execute when the mouse pointer enters or leaves the element.
2103 hover(handlerInOut: (eventObject: JQueryEventObject) => any): JQuery;
2106 * Trigger the "keydown" event on an element.
2110 * Bind an event handler to the "keydown" JavaScript event
2112 * @param handler A function to execute each time the event is triggered.
2114 keydown(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
2116 * Bind an event handler to the "keydown" JavaScript event
2118 * @param eventData An object containing data that will be passed to the event handler.
2119 * @param handler A function to execute each time the event is triggered.
2121 keydown(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
2124 * Trigger the "keypress" event on an element.
2128 * Bind an event handler to the "keypress" JavaScript event
2130 * @param handler A function to execute each time the event is triggered.
2132 keypress(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
2134 * Bind an event handler to the "keypress" JavaScript event
2136 * @param eventData An object containing data that will be passed to the event handler.
2137 * @param handler A function to execute each time the event is triggered.
2139 keypress(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
2142 * Trigger the "keyup" event on an element.
2146 * Bind an event handler to the "keyup" JavaScript event
2148 * @param handler A function to execute each time the event is triggered.
2150 keyup(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
2152 * Bind an event handler to the "keyup" JavaScript event
2154 * @param eventData An object containing data that will be passed to the event handler.
2155 * @param handler A function to execute each time the event is triggered.
2157 keyup(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
2160 * Bind an event handler to the "load" JavaScript event.
2162 * @param handler A function to execute when the event is triggered.
2164 load(handler: (eventObject: JQueryEventObject) => any): JQuery;
2166 * Bind an event handler to the "load" JavaScript event.
2168 * @param eventData An object containing data that will be passed to the event handler.
2169 * @param handler A function to execute when the event is triggered.
2171 load(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2174 * Trigger the "mousedown" event on an element.
2176 mousedown(): JQuery;
2178 * Bind an event handler to the "mousedown" JavaScript event.
2180 * @param handler A function to execute when the event is triggered.
2182 mousedown(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2184 * Bind an event handler to the "mousedown" JavaScript event.
2186 * @param eventData An object containing data that will be passed to the event handler.
2187 * @param handler A function to execute when the event is triggered.
2189 mousedown(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2192 * Trigger the "mouseenter" event on an element.
2194 mouseenter(): JQuery;
2196 * Bind an event handler to be fired when the mouse enters an element.
2198 * @param handler A function to execute when the event is triggered.
2200 mouseenter(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2202 * Bind an event handler to be fired when the mouse enters an element.
2204 * @param eventData An object containing data that will be passed to the event handler.
2205 * @param handler A function to execute when the event is triggered.
2207 mouseenter(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2210 * Trigger the "mouseleave" event on an element.
2212 mouseleave(): JQuery;
2214 * Bind an event handler to be fired when the mouse leaves an element.
2216 * @param handler A function to execute when the event is triggered.
2218 mouseleave(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2220 * Bind an event handler to be fired when the mouse leaves an element.
2222 * @param eventData An object containing data that will be passed to the event handler.
2223 * @param handler A function to execute when the event is triggered.
2225 mouseleave(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2228 * Trigger the "mousemove" event on an element.
2230 mousemove(): JQuery;
2232 * Bind an event handler to the "mousemove" JavaScript event.
2234 * @param handler A function to execute when the event is triggered.
2236 mousemove(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2238 * Bind an event handler to the "mousemove" JavaScript event.
2240 * @param eventData An object containing data that will be passed to the event handler.
2241 * @param handler A function to execute when the event is triggered.
2243 mousemove(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2246 * Trigger the "mouseout" event on an element.
2250 * Bind an event handler to the "mouseout" JavaScript event.
2252 * @param handler A function to execute when the event is triggered.
2254 mouseout(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2256 * Bind an event handler to the "mouseout" JavaScript event.
2258 * @param eventData An object containing data that will be passed to the event handler.
2259 * @param handler A function to execute when the event is triggered.
2261 mouseout(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2264 * Trigger the "mouseover" event on an element.
2266 mouseover(): JQuery;
2268 * Bind an event handler to the "mouseover" JavaScript event.
2270 * @param handler A function to execute when the event is triggered.
2272 mouseover(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2274 * Bind an event handler to the "mouseover" JavaScript event.
2276 * @param eventData An object containing data that will be passed to the event handler.
2277 * @param handler A function to execute when the event is triggered.
2279 mouseover(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2282 * Trigger the "mouseup" event on an element.
2286 * Bind an event handler to the "mouseup" JavaScript event.
2288 * @param handler A function to execute when the event is triggered.
2290 mouseup(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2292 * Bind an event handler to the "mouseup" JavaScript event.
2294 * @param eventData An object containing data that will be passed to the event handler.
2295 * @param handler A function to execute when the event is triggered.
2297 mouseup(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2300 * Remove an event handler.
2304 * Remove an event handler.
2306 * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
2307 * @param selector A selector which should match the one originally passed to .on() when attaching event handlers.
2308 * @param handler A handler function previously attached for the event(s), or the special value false.
2310 off(events: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2312 * Remove an event handler.
2314 * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
2315 * @param handler A handler function previously attached for the event(s), or the special value false. Takes handler with extra args that can be attached with on().
2317 off(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
2319 * Remove an event handler.
2321 * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
2322 * @param handler A handler function previously attached for the event(s), or the special value false.
2324 off(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
2326 * Remove an event handler.
2328 * @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).
2329 * @param selector A selector which should match the one originally passed to .on() when attaching event handlers.
2331 off(events: { [key: string]: any; }, selector?: string): JQuery;
2334 * Attach an event handler function for one or more events to the selected elements.
2336 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2337 * @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).
2339 on(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
2341 * Attach an event handler function for one or more events to the selected elements.
2343 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2344 * @param data Data to be passed to the handler in event.data when an event is triggered.
2345 * @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.
2347 on(events: string, data : any, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
2349 * Attach an event handler function for one or more events to the selected elements.
2351 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2352 * @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.
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 on(events: string, selector: string, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery;
2357 * Attach an event handler function for one or more events to the selected elements.
2359 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2360 * @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.
2361 * @param data Data to be passed to the handler in event.data when an event is triggered.
2362 * @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.
2364 on(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery;
2366 * Attach an event handler function for one or more events to the selected elements.
2368 * @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).
2369 * @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.
2370 * @param data Data to be passed to the handler in event.data when an event occurs.
2372 on(events: { [key: string]: any; }, selector?: string, data?: any): JQuery;
2374 * Attach an event handler function for one or more events to the selected elements.
2376 * @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).
2377 * @param data Data to be passed to the handler in event.data when an event occurs.
2379 on(events: { [key: string]: any; }, data?: any): JQuery;
2382 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2384 * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
2385 * @param handler A function to execute at the time the event is triggered.
2387 one(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
2389 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2391 * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
2392 * @param data An object containing data that will be passed to the event handler.
2393 * @param handler A function to execute at the time the event is triggered.
2395 one(events: string, data: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2398 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2400 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2401 * @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.
2402 * @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.
2404 one(events: string, selector: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
2406 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2408 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2409 * @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.
2410 * @param data Data to be passed to the handler in event.data when an event is triggered.
2411 * @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.
2413 one(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
2416 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2418 * @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).
2419 * @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.
2420 * @param data Data to be passed to the handler in event.data when an event occurs.
2422 one(events: { [key: string]: any; }, selector?: string, data?: any): JQuery;
2425 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2427 * @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).
2428 * @param data Data to be passed to the handler in event.data when an event occurs.
2430 one(events: { [key: string]: any; }, data?: any): JQuery;
2434 * Specify a function to execute when the DOM is fully loaded.
2436 * @param handler A function to execute after the DOM is ready.
2438 ready(handler: (jQueryAlias?: JQueryStatic) => any): JQuery;
2441 * Trigger the "resize" event on an element.
2445 * Bind an event handler to the "resize" JavaScript event.
2447 * @param handler A function to execute each time the event is triggered.
2449 resize(handler: (eventObject: JQueryEventObject) => any): JQuery;
2451 * Bind an event handler to the "resize" JavaScript event.
2453 * @param eventData An object containing data that will be passed to the event handler.
2454 * @param handler A function to execute each time the event is triggered.
2456 resize(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2459 * Trigger the "scroll" event on an element.
2463 * Bind an event handler to the "scroll" JavaScript event.
2465 * @param handler A function to execute each time the event is triggered.
2467 scroll(handler: (eventObject: JQueryEventObject) => any): JQuery;
2469 * Bind an event handler to the "scroll" JavaScript event.
2471 * @param eventData An object containing data that will be passed to the event handler.
2472 * @param handler A function to execute each time the event is triggered.
2474 scroll(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2477 * Trigger the "select" event on an element.
2481 * Bind an event handler to the "select" JavaScript event.
2483 * @param handler A function to execute each time the event is triggered.
2485 select(handler: (eventObject: JQueryEventObject) => any): JQuery;
2487 * Bind an event handler to the "select" JavaScript event.
2489 * @param eventData An object containing data that will be passed to the event handler.
2490 * @param handler A function to execute each time the event is triggered.
2492 select(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2495 * Trigger the "submit" event on an element.
2499 * Bind an event handler to the "submit" JavaScript event
2501 * @param handler A function to execute each time the event is triggered.
2503 submit(handler: (eventObject: JQueryEventObject) => any): JQuery;
2505 * Bind an event handler to the "submit" JavaScript event
2507 * @param eventData An object containing data that will be passed to the event handler.
2508 * @param handler A function to execute each time the event is triggered.
2510 submit(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2513 * Execute all handlers and behaviors attached to the matched elements for the given event type.
2515 * @param eventType A string containing a JavaScript event type, such as click or submit.
2516 * @param extraParameters Additional parameters to pass along to the event handler.
2518 trigger(eventType: string, extraParameters?: any[]|Object): JQuery;
2520 * Execute all handlers and behaviors attached to the matched elements for the given event type.
2522 * @param event A jQuery.Event object.
2523 * @param extraParameters Additional parameters to pass along to the event handler.
2525 trigger(event: JQueryEventObject, extraParameters?: any[]|Object): JQuery;
2528 * Execute all handlers attached to an element for an event.
2530 * @param eventType A string containing a JavaScript event type, such as click or submit.
2531 * @param extraParameters An array of additional parameters to pass along to the event handler.
2533 triggerHandler(eventType: string, ...extraParameters: any[]): Object;
2536 * Execute all handlers attached to an element for an event.
2538 * @param event A jQuery.Event object.
2539 * @param extraParameters An array of additional parameters to pass along to the event handler.
2541 triggerHandler(event: JQueryEventObject, ...extraParameters: any[]): Object;
2544 * Remove a previously-attached event handler from the elements.
2546 * @param eventType A string containing a JavaScript event type, such as click or submit.
2547 * @param handler The function that is to be no longer executed.
2549 unbind(eventType?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2551 * Remove a previously-attached event handler from the elements.
2553 * @param eventType A string containing a JavaScript event type, such as click or submit.
2554 * @param fls Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ).
2556 unbind(eventType: string, fls: boolean): JQuery;
2558 * Remove a previously-attached event handler from the elements.
2560 * @param evt A JavaScript event object as passed to an event handler.
2562 unbind(evt: any): JQuery;
2565 * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
2567 undelegate(): JQuery;
2569 * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
2571 * @param selector A selector which will be used to filter the event results.
2572 * @param eventType A string containing a JavaScript event type, such as "click" or "keydown"
2573 * @param handler A function to execute at the time the event is triggered.
2575 undelegate(selector: string, eventType: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2577 * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
2579 * @param selector A selector which will be used to filter the event results.
2580 * @param events An object of one or more event types and previously bound functions to unbind from them.
2582 undelegate(selector: string, events: Object): JQuery;
2584 * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
2586 * @param namespace A string containing a namespace to unbind all events from.
2588 undelegate(namespace: string): JQuery;
2591 * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8)
2593 * @param handler A function to execute when the event is triggered.
2595 unload(handler: (eventObject: JQueryEventObject) => any): JQuery;
2597 * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8)
2599 * @param eventData A plain object of data that will be passed to the event handler.
2600 * @param handler A function to execute when the event is triggered.
2602 unload(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2605 * The DOM node context originally passed to jQuery(); if none was passed then context will likely be the document. (DEPRECATED from v1.10)
2612 * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8)
2614 * @param handler A function to execute when the event is triggered.
2616 error(handler: (eventObject: JQueryEventObject) => any): JQuery;
2618 * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8)
2620 * @param eventData A plain object of data that will be passed to the event handler.
2621 * @param handler A function to execute when the event is triggered.
2623 error(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
2626 * Add a collection of DOM elements onto the jQuery stack.
2628 * @param elements An array of elements to push onto the stack and make into a new jQuery object.
2630 pushStack(elements: any[]): JQuery;
2632 * Add a collection of DOM elements onto the jQuery stack.
2634 * @param elements An array of elements to push onto the stack and make into a new jQuery object.
2635 * @param name The name of a jQuery method that generated the array of elements.
2636 * @param arguments The arguments that were passed in to the jQuery method (for serialization).
2638 pushStack(elements: any[], name: string, arguments: any[]): JQuery;
2641 * Insert content, specified by the parameter, after each element in the set of matched elements.
2643 * param content1 HTML string, DOM element, DocumentFragment, array of elements, or jQuery object to insert after each element in the set of matched elements.
2644 * 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.
2646 after(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery;
2648 * Insert content, specified by the parameter, after each element in the set of matched elements.
2650 * 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.
2652 after(func: (index: number, html: string) => string|Element|JQuery): JQuery;
2655 * Insert content, specified by the parameter, to the end of each element in the set of matched elements.
2657 * param content1 DOM element, DocumentFragment, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.
2658 * 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.
2660 append(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery;
2662 * Insert content, specified by the parameter, to the end of each element in the set of matched elements.
2664 * 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.
2666 append(func: (index: number, html: string) => string|Element|JQuery): JQuery;
2669 * Insert every element in the set of matched elements to the end of the target.
2671 * @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.
2673 appendTo(target: JQuery|any[]|Element|string): JQuery;
2676 * Insert content, specified by the parameter, before each element in the set of matched elements.
2678 * param content1 HTML string, DOM element, DocumentFragment, array of elements, or jQuery object to insert before each element in the set of matched elements.
2679 * 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.
2681 before(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery;
2683 * Insert content, specified by the parameter, before each element in the set of matched elements.
2685 * 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.
2687 before(func: (index: number, html: string) => string|Element|JQuery): JQuery;
2690 * Create a deep copy of the set of matched elements.
2692 * param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false.
2693 * 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).
2695 clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): JQuery;
2698 * Remove the set of matched elements from the DOM.
2700 * param selector A selector expression that filters the set of matched elements to be removed.
2702 detach(selector?: string): JQuery;
2705 * Remove all child nodes of the set of matched elements from the DOM.
2710 * Insert every element in the set of matched elements after the target.
2712 * 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.
2714 insertAfter(target: JQuery|any[]|Element|Text|string): JQuery;
2717 * Insert every element in the set of matched elements before the target.
2719 * 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.
2721 insertBefore(target: JQuery|any[]|Element|Text|string): JQuery;
2724 * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
2726 * param content1 DOM element, DocumentFragment, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements.
2727 * 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.
2729 prepend(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery;
2731 * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
2733 * 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.
2735 prepend(func: (index: number, html: string) => string|Element|JQuery): JQuery;
2738 * Insert every element in the set of matched elements to the beginning of the target.
2740 * @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.
2742 prependTo(target: JQuery|any[]|Element|string): JQuery;
2745 * Remove the set of matched elements from the DOM.
2747 * @param selector A selector expression that filters the set of matched elements to be removed.
2749 remove(selector?: string): JQuery;
2752 * Replace each target element with the set of matched elements.
2754 * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace.
2756 replaceAll(target: JQuery|any[]|Element|string): JQuery;
2759 * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
2761 * param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object.
2763 replaceWith(newContent: JQuery|any[]|Element|Text|string): JQuery;
2765 * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
2767 * param func A function that returns content with which to replace the set of matched elements.
2769 replaceWith(func: () => Element|JQuery): JQuery;
2772 * Get the combined text contents of each element in the set of matched elements, including their descendants.
2776 * Set the content of each element in the set of matched elements to the specified text.
2778 * @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.
2780 text(text: string|number|boolean): JQuery;
2782 * Set the content of each element in the set of matched elements to the specified text.
2784 * @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.
2786 text(func: (index: number, text: string) => string): JQuery;
2789 * Retrieve all the elements contained in the jQuery set, as an array.
2792 toArray(): HTMLElement[];
2795 * Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
2800 * Wrap an HTML structure around each element in the set of matched elements.
2802 * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
2804 wrap(wrappingElement: JQuery|Element|string): JQuery;
2806 * Wrap an HTML structure around each element in the set of matched elements.
2808 * @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.
2810 wrap(func: (index: number) => string|JQuery): JQuery;
2813 * Wrap an HTML structure around all elements in the set of matched elements.
2815 * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
2817 wrapAll(wrappingElement: JQuery|Element|string): JQuery;
2818 wrapAll(func: (index: number) => string): JQuery;
2821 * Wrap an HTML structure around the content of each element in the set of matched elements.
2823 * @param wrappingElement An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements.
2825 wrapInner(wrappingElement: JQuery|Element|string): JQuery;
2827 * Wrap an HTML structure around the content of each element in the set of matched elements.
2829 * @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.
2831 wrapInner(func: (index: number) => string): JQuery;
2834 * Iterate over a jQuery object, executing a function for each matched element.
2836 * @param func A function to execute for each matched element.
2838 each(func: (index: number, elem: Element) => any): JQuery;
2841 * Retrieve one of the elements matched by the jQuery object.
2843 * @param index A zero-based integer indicating which element to retrieve.
2845 get(index: number): HTMLElement;
2847 * Retrieve the elements matched by the jQuery object.
2850 get(): HTMLElement[];
2853 * Search for a given element from among the matched elements.
2857 * Search for a given element from among the matched elements.
2859 * @param selector A selector representing a jQuery collection in which to look for an element.
2861 index(selector: string|JQuery|Element): number;
2864 * The number of elements in the jQuery object.
2868 * A selector representing selector passed to jQuery(), if any, when creating the original set.
2869 * version deprecated: 1.7, removed: 1.9
2872 [index: string]: any;
2873 [index: number]: HTMLElement;
2876 * Add elements to the set of matched elements.
2878 * @param selector A string representing a selector expression to find additional elements to add to the set of matched elements.
2879 * @param context The point in the document at which the selector should begin matching; similar to the context argument of the $(selector, context) method.
2881 add(selector: string, context?: Element): JQuery;
2883 * Add elements to the set of matched elements.
2885 * @param elements One or more elements to add to the set of matched elements.
2887 add(...elements: Element[]): JQuery;
2889 * Add elements to the set of matched elements.
2891 * @param html An HTML fragment to add to the set of matched elements.
2893 add(html: string): JQuery;
2895 * Add elements to the set of matched elements.
2897 * @param obj An existing jQuery object to add to the set of matched elements.
2899 add(obj: JQuery): JQuery;
2902 * Get the children of each element in the set of matched elements, optionally filtered by a selector.
2904 * @param selector A string containing a selector expression to match elements against.
2906 children(selector?: string): JQuery;
2909 * 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.
2911 * @param selector A string containing a selector expression to match elements against.
2913 closest(selector: string): JQuery;
2915 * 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.
2917 * @param selector A string containing a selector expression to match elements against.
2918 * @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.
2920 closest(selector: string, context?: Element): JQuery;
2922 * 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.
2924 * @param obj A jQuery object to match elements against.
2926 closest(obj: JQuery): JQuery;
2928 * 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.
2930 * @param element An element to match elements against.
2932 closest(element: Element): JQuery;
2935 * Get an array of all the elements and selectors matched against the current element up through the DOM tree.
2937 * @param selectors An array or string containing a selector expression to match elements against (can also be a jQuery object).
2938 * @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.
2940 closest(selectors: any, context?: Element): any[];
2943 * Get the children of each element in the set of matched elements, including text and comment nodes.
2948 * End the most recent filtering operation in the current chain and return the set of matched elements to its previous state.
2953 * Reduce the set of matched elements to the one at the specified index.
2955 * @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.
2958 eq(index: number): JQuery;
2961 * Reduce the set of matched elements to those that match the selector or pass the function's test.
2963 * @param selector A string containing a selector expression to match the current set of elements against.
2965 filter(selector: string): JQuery;
2967 * Reduce the set of matched elements to those that match the selector or pass the function's test.
2969 * @param func A function used as a test for each element in the set. this is the current DOM element.
2971 filter(func: (index: number, element: Element) => any): JQuery;
2973 * Reduce the set of matched elements to those that match the selector or pass the function's test.
2975 * @param element An element to match the current set of elements against.
2977 filter(element: Element): JQuery;
2979 * Reduce the set of matched elements to those that match the selector or pass the function's test.
2981 * @param obj An existing jQuery object to match the current set of elements against.
2983 filter(obj: JQuery): JQuery;
2986 * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
2988 * @param selector A string containing a selector expression to match elements against.
2990 find(selector: string): JQuery;
2992 * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
2994 * @param element An element to match elements against.
2996 find(element: Element): JQuery;
2998 * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
3000 * @param obj A jQuery object to match elements against.
3002 find(obj: JQuery): JQuery;
3005 * Reduce the set of matched elements to the first in the set.
3010 * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
3012 * @param selector A string containing a selector expression to match elements against.
3014 has(selector: string): JQuery;
3016 * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
3018 * @param contained A DOM element to match elements against.
3020 has(contained: Element): JQuery;
3023 * 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.
3025 * @param selector A string containing a selector expression to match elements against.
3027 is(selector: string): boolean;
3029 * 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.
3031 * @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.
3033 is(func: (index: number, element: Element) => boolean): boolean;
3035 * 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.
3037 * @param obj An existing jQuery object to match the current set of elements against.
3039 is(obj: JQuery): boolean;
3041 * 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.
3043 * @param elements One or more elements to match the current set of elements against.
3045 is(elements: any): boolean;
3048 * Reduce the set of matched elements to the final one in the set.
3053 * Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.
3055 * @param callback A function object that will be invoked for each element in the current set.
3057 map(callback: (index: number, domElement: Element) => any): JQuery;
3060 * 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.
3062 * @param selector A string containing a selector expression to match elements against.
3064 next(selector?: string): JQuery;
3067 * Get all following siblings of each element in the set of matched elements, optionally filtered by a selector.
3069 * @param selector A string containing a selector expression to match elements against.
3071 nextAll(selector?: string): JQuery;
3074 * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
3076 * @param selector A string containing a selector expression to indicate where to stop matching following sibling elements.
3077 * @param filter A string containing a selector expression to match elements against.
3079 nextUntil(selector?: string, filter?: string): JQuery;
3081 * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
3083 * @param element A DOM node or jQuery object indicating where to stop matching following sibling elements.
3084 * @param filter A string containing a selector expression to match elements against.
3086 nextUntil(element?: Element, filter?: string): JQuery;
3088 * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
3090 * @param obj A DOM node or jQuery object indicating where to stop matching following sibling elements.
3091 * @param filter A string containing a selector expression to match elements against.
3093 nextUntil(obj?: JQuery, filter?: string): JQuery;
3096 * Remove elements from the set of matched elements.
3098 * @param selector A string containing a selector expression to match elements against.
3100 not(selector: string): JQuery;
3102 * Remove elements from the set of matched elements.
3104 * @param func A function used as a test for each element in the set. this is the current DOM element.
3106 not(func: (index: number, element: Element) => boolean): JQuery;
3108 * Remove elements from the set of matched elements.
3110 * @param elements One or more DOM elements to remove from the matched set.
3112 not(elements: Element|Element[]): JQuery;
3114 * Remove elements from the set of matched elements.
3116 * @param obj An existing jQuery object to match the current set of elements against.
3118 not(obj: JQuery): JQuery;
3121 * Get the closest ancestor element that is positioned.
3123 offsetParent(): JQuery;
3126 * Get the parent of each element in the current set of matched elements, optionally filtered by a selector.
3128 * @param selector A string containing a selector expression to match elements against.
3130 parent(selector?: string): JQuery;
3133 * Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector.
3135 * @param selector A string containing a selector expression to match elements against.
3137 parents(selector?: string): JQuery;
3140 * 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.
3142 * @param selector A string containing a selector expression to indicate where to stop matching ancestor elements.
3143 * @param filter A string containing a selector expression to match elements against.
3145 parentsUntil(selector?: string, filter?: string): JQuery;
3147 * 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.
3149 * @param element A DOM node or jQuery object indicating where to stop matching ancestor elements.
3150 * @param filter A string containing a selector expression to match elements against.
3152 parentsUntil(element?: Element, filter?: string): JQuery;
3154 * 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.
3156 * @param obj A DOM node or jQuery object indicating where to stop matching ancestor elements.
3157 * @param filter A string containing a selector expression to match elements against.
3159 parentsUntil(obj?: JQuery, filter?: string): JQuery;
3162 * Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector.
3164 * @param selector A string containing a selector expression to match elements against.
3166 prev(selector?: string): JQuery;
3169 * Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector.
3171 * @param selector A string containing a selector expression to match elements against.
3173 prevAll(selector?: string): JQuery;
3176 * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
3178 * @param selector A string containing a selector expression to indicate where to stop matching preceding sibling elements.
3179 * @param filter A string containing a selector expression to match elements against.
3181 prevUntil(selector?: string, filter?: string): JQuery;
3183 * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
3185 * @param element A DOM node or jQuery object indicating where to stop matching preceding sibling elements.
3186 * @param filter A string containing a selector expression to match elements against.
3188 prevUntil(element?: Element, filter?: string): JQuery;
3190 * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
3192 * @param obj A DOM node or jQuery object indicating where to stop matching preceding sibling elements.
3193 * @param filter A string containing a selector expression to match elements against.
3195 prevUntil(obj?: JQuery, filter?: string): JQuery;
3198 * Get the siblings of each element in the set of matched elements, optionally filtered by a selector.
3200 * @param selector A string containing a selector expression to match elements against.
3202 siblings(selector?: string): JQuery;
3205 * Reduce the set of matched elements to a subset specified by a range of indices.
3207 * @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.
3208 * @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.
3210 slice(start: number, end?: number): JQuery;
3213 * Show the queue of functions to be executed on the matched elements.
3215 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
3217 queue(queueName?: string): any[];
3219 * Manipulate the queue of functions to be executed, once for each matched element.
3221 * @param newQueue An array of functions to replace the current queue contents.
3223 queue(newQueue: Function[]): JQuery;
3225 * Manipulate the queue of functions to be executed, once for each matched element.
3227 * @param callback The new function to add to the queue, with a function to call that will dequeue the next item.
3229 queue(callback: Function): JQuery;
3231 * Manipulate the queue of functions to be executed, once for each matched element.
3233 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
3234 * @param newQueue An array of functions to replace the current queue contents.
3236 queue(queueName: string, newQueue: Function[]): JQuery;
3238 * Manipulate the queue of functions to be executed, once for each matched element.
3240 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
3241 * @param callback The new function to add to the queue, with a function to call that will dequeue the next item.
3243 queue(queueName: string, callback: Function): JQuery;
3245 declare module "jquery" {
3248 declare var jQuery: JQueryStatic;
3249 declare var $: JQueryStatic;