blob: ab95cde292b07cc7a30b12496d94f24efc320374 [file] [log] [blame]
Matteo Scandolo44b7d6b2016-12-08 13:48:01 -08001// Generated by typings
2// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/c8a69b0b0c71cc00d4ada94a4420fb037b3cc9cd/jquery/jquery.d.ts
3interface JQueryAjaxSettings {
4 /**
5 * 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.
6 */
7 accepts?: any;
8 /**
9 * 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().
10 */
11 async?: boolean;
12 /**
13 * 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.
14 */
15 beforeSend? (jqXHR: JQueryXHR, settings: JQueryAjaxSettings): any;
16 /**
17 * 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.
18 */
19 cache?: boolean;
20 /**
21 * 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.
22 */
23 complete? (jqXHR: JQueryXHR, textStatus: string): any;
24 /**
25 * An object of string/regular-expression pairs that determine how jQuery will parse the response, given its content type. (version added: 1.5)
26 */
27 contents?: { [key: string]: any; };
28 //According to jQuery.ajax source code, ajax's option actually allows contentType to set to "false"
29 // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/742
30 /**
31 * 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.
32 */
33 contentType?: any;
34 /**
35 * 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).
36 */
37 context?: any;
38 /**
39 * 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)
40 */
41 converters?: { [key: string]: any; };
42 /**
43 * 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)
44 */
45 crossDomain?: boolean;
46 /**
47 * 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).
48 */
49 data?: any;
50 /**
51 * 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.
52 */
53 dataFilter? (data: any, ty: any): any;
54 /**
55 * 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).
56 */
57 dataType?: string;
58 /**
59 * 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.
60 */
61 error? (jqXHR: JQueryXHR, textStatus: string, errorThrown: string): any;
62 /**
63 * 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.
64 */
65 global?: boolean;
66 /**
67 * 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)
68 */
69 headers?: { [key: string]: any; };
70 /**
71 * 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.
72 */
73 ifModified?: boolean;
74 /**
75 * 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)
76 */
77 isLocal?: boolean;
78 /**
79 * 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" }
80 */
81 jsonp?: any;
82 /**
83 * 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.
84 */
85 jsonpCallback?: any;
86 /**
87 * The HTTP method to use for the request (e.g. "POST", "GET", "PUT"). (version added: 1.9.0)
88 */
89 method?: string;
90 /**
91 * A mime type to override the XHR mime type. (version added: 1.5.1)
92 */
93 mimeType?: string;
94 /**
95 * A password to be used with XMLHttpRequest in response to an HTTP access authentication request.
96 */
97 password?: string;
98 /**
99 * 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.
100 */
101 processData?: boolean;
102 /**
103 * 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.
104 */
105 scriptCharset?: string;
106 /**
107 * 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)
108 */
109 statusCode?: { [key: string]: any; };
110 /**
111 * 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.
112 */
113 success? (data: any, textStatus: string, jqXHR: JQueryXHR): any;
114 /**
115 * 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.
116 */
117 timeout?: number;
118 /**
119 * Set this to true if you wish to use the traditional style of param serialization.
120 */
121 traditional?: boolean;
122 /**
123 * 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.
124 */
125 type?: string;
126 /**
127 * A string containing the URL to which the request is sent.
128 */
129 url?: string;
130 /**
131 * A username to be used with XMLHttpRequest in response to an HTTP access authentication request.
132 */
133 username?: string;
134 /**
135 * 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.
136 */
137 xhr?: any;
138 /**
139 * 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)
140 */
141 xhrFields?: { [key: string]: any; };
142}
143
144/**
145 * Interface for the jqXHR object
146 */
147interface JQueryXHR extends XMLHttpRequest, JQueryPromise<any> {
148 /**
149 * 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).
150 */
151 overrideMimeType(mimeType: string): any;
152 /**
153 * Cancel the request.
154 *
155 * @param statusText A string passed as the textStatus parameter for the done callback. Default value: "canceled"
156 */
157 abort(statusText?: string): void;
158 /**
159 * 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.
160 */
161 then<R>(doneCallback: (data: any, textStatus: string, jqXHR: JQueryXHR) => R, failCallback?: (jqXHR: JQueryXHR, textStatus: string, errorThrown: any) => void): JQueryPromise<R>;
162 /**
163 * Property containing the parsed response if the response Content-Type is json
164 */
165 responseJSON?: any;
166 /**
167 * A function to be called if the request fails.
168 */
169 error(xhr: JQueryXHR, textStatus: string, errorThrown: string): void;
170}
171
172/**
173 * Interface for the JQuery callback
174 */
175interface JQueryCallback {
176 /**
177 * Add a callback or a collection of callbacks to a callback list.
178 *
179 * @param callbacks A function, or array of functions, that are to be added to the callback list.
180 */
181 add(callbacks: Function): JQueryCallback;
182 /**
183 * Add a callback or a collection of callbacks to a callback list.
184 *
185 * @param callbacks A function, or array of functions, that are to be added to the callback list.
186 */
187 add(callbacks: Function[]): JQueryCallback;
188
189 /**
190 * Disable a callback list from doing anything more.
191 */
192 disable(): JQueryCallback;
193
194 /**
195 * Determine if the callbacks list has been disabled.
196 */
197 disabled(): boolean;
198
199 /**
200 * Remove all of the callbacks from a list.
201 */
202 empty(): JQueryCallback;
203
204 /**
205 * Call all of the callbacks with the given arguments
206 *
207 * @param arguments The argument or list of arguments to pass back to the callback list.
208 */
209 fire(...arguments: any[]): JQueryCallback;
210
211 /**
212 * Determine if the callbacks have already been called at least once.
213 */
214 fired(): boolean;
215
216 /**
217 * Call all callbacks in a list with the given context and arguments.
218 *
219 * @param context A reference to the context in which the callbacks in the list should be fired.
220 * @param arguments An argument, or array of arguments, to pass to the callbacks in the list.
221 */
222 fireWith(context?: any, args?: any[]): JQueryCallback;
223
224 /**
225 * Determine whether a supplied callback is in a list
226 *
227 * @param callback The callback to search for.
228 */
229 has(callback: Function): boolean;
230
231 /**
232 * Lock a callback list in its current state.
233 */
234 lock(): JQueryCallback;
235
236 /**
237 * Determine if the callbacks list has been locked.
238 */
239 locked(): boolean;
240
241 /**
242 * Remove a callback or a collection of callbacks from a callback list.
243 *
244 * @param callbacks A function, or array of functions, that are to be removed from the callback list.
245 */
246 remove(callbacks: Function): JQueryCallback;
247 /**
248 * Remove a callback or a collection of callbacks from a callback list.
249 *
250 * @param callbacks A function, or array of functions, that are to be removed from the callback list.
251 */
252 remove(callbacks: Function[]): JQueryCallback;
253}
254
255/**
256 * Allows jQuery Promises to interop with non-jQuery promises
257 */
258interface JQueryGenericPromise<T> {
259 /**
260 * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
261 *
262 * @param doneFilter A function that is called when the Deferred is resolved.
263 * @param failFilter An optional function that is called when the Deferred is rejected.
264 */
265 then<U>(doneFilter: (value?: T, ...values: any[]) => U|JQueryPromise<U>, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise<U>;
266
267 /**
268 * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
269 *
270 * @param doneFilter A function that is called when the Deferred is resolved.
271 * @param failFilter An optional function that is called when the Deferred is rejected.
272 */
273 then(doneFilter: (value?: T, ...values: any[]) => void, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise<void>;
274}
275
276/**
277 * Interface for the JQuery promise/deferred callbacks
278 */
279interface JQueryPromiseCallback<T> {
280 (value?: T, ...args: any[]): void;
281}
282
283interface JQueryPromiseOperator<T, U> {
284 (callback1: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...callbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<U>;
285}
286
287/**
288 * Interface for the JQuery promise, part of callbacks
289 */
290interface JQueryPromise<T> extends JQueryGenericPromise<T> {
291 /**
292 * Determine the current state of a Deferred object.
293 */
294 state(): string;
295 /**
296 * Add handlers to be called when the Deferred object is either resolved or rejected.
297 *
298 * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected.
299 * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected.
300 */
301 always(alwaysCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...alwaysCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<T>;
302 /**
303 * Add handlers to be called when the Deferred object is resolved.
304 *
305 * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved.
306 * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved.
307 */
308 done(doneCallback1?: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...doneCallbackN: Array<JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[]>): JQueryPromise<T>;
309 /**
310 * Add handlers to be called when the Deferred object is rejected.
311 *
312 * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected.
313 * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected.
314 */
315 fail(failCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...failCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<T>;
316 /**
317 * Add handlers to be called when the Deferred object generates progress notifications.
318 *
319 * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications.
320 */
321 progress(progressCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...progressCallbackN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<T>;
322
323 // Deprecated - given no typings
324 pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise<any>;
325
326 /**
327 * Return a Deferred's Promise object.
328 *
329 * @param target Object onto which the promise methods have to be attached
330 */
331 promise(target?: any): JQueryPromise<T>;
332}
333
334/**
335 * Interface for the JQuery deferred, part of callbacks
336 */
337interface JQueryDeferred<T> extends JQueryGenericPromise<T> {
338 /**
339 * Determine the current state of a Deferred object.
340 */
341 state(): string;
342 /**
343 * Add handlers to be called when the Deferred object is either resolved or rejected.
344 *
345 * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected.
346 * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected.
347 */
348 always(alwaysCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...alwaysCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryDeferred<T>;
349 /**
350 * Add handlers to be called when the Deferred object is resolved.
351 *
352 * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved.
353 * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved.
354 */
355 done(doneCallback1?: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...doneCallbackN: Array<JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[]>): JQueryDeferred<T>;
356 /**
357 * Add handlers to be called when the Deferred object is rejected.
358 *
359 * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected.
360 * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected.
361 */
362 fail(failCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...failCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryDeferred<T>;
363 /**
364 * Add handlers to be called when the Deferred object generates progress notifications.
365 *
366 * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications.
367 */
368 progress(progressCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...progressCallbackN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryDeferred<T>;
369
370 /**
371 * Call the progressCallbacks on a Deferred object with the given args.
372 *
373 * @param args Optional arguments that are passed to the progressCallbacks.
374 */
375 notify(value?: any, ...args: any[]): JQueryDeferred<T>;
376
377 /**
378 * Call the progressCallbacks on a Deferred object with the given context and args.
379 *
380 * @param context Context passed to the progressCallbacks as the this object.
381 * @param args Optional arguments that are passed to the progressCallbacks.
382 */
383 notifyWith(context: any, value?: any[]): JQueryDeferred<T>;
384
385 /**
386 * Reject a Deferred object and call any failCallbacks with the given args.
387 *
388 * @param args Optional arguments that are passed to the failCallbacks.
389 */
390 reject(value?: any, ...args: any[]): JQueryDeferred<T>;
391 /**
392 * Reject a Deferred object and call any failCallbacks with the given context and args.
393 *
394 * @param context Context passed to the failCallbacks as the this object.
395 * @param args An optional array of arguments that are passed to the failCallbacks.
396 */
397 rejectWith(context: any, value?: any[]): JQueryDeferred<T>;
398
399 /**
400 * Resolve a Deferred object and call any doneCallbacks with the given args.
401 *
402 * @param value First argument passed to doneCallbacks.
403 * @param args Optional subsequent arguments that are passed to the doneCallbacks.
404 */
405 resolve(value?: T, ...args: any[]): JQueryDeferred<T>;
406
407 /**
408 * Resolve a Deferred object and call any doneCallbacks with the given context and args.
409 *
410 * @param context Context passed to the doneCallbacks as the this object.
411 * @param args An optional array of arguments that are passed to the doneCallbacks.
412 */
413 resolveWith(context: any, value?: T[]): JQueryDeferred<T>;
414
415 /**
416 * Return a Deferred's Promise object.
417 *
418 * @param target Object onto which the promise methods have to be attached
419 */
420 promise(target?: any): JQueryPromise<T>;
421
422 // Deprecated - given no typings
423 pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise<any>;
424}
425
426/**
427 * Interface of the JQuery extension of the W3C event object
428 */
429interface BaseJQueryEventObject extends Event {
430 currentTarget: Element;
431 data: any;
432 delegateTarget: Element;
433 isDefaultPrevented(): boolean;
434 isImmediatePropagationStopped(): boolean;
435 isPropagationStopped(): boolean;
436 namespace: string;
437 originalEvent: Event;
438 preventDefault(): any;
439 relatedTarget: Element;
440 result: any;
441 stopImmediatePropagation(): void;
442 stopPropagation(): void;
443 target: Element;
444 pageX: number;
445 pageY: number;
446 which: number;
447 metaKey: boolean;
448}
449
450interface JQueryInputEventObject extends BaseJQueryEventObject {
451 altKey: boolean;
452 ctrlKey: boolean;
453 metaKey: boolean;
454 shiftKey: boolean;
455}
456
457interface JQueryMouseEventObject extends JQueryInputEventObject {
458 button: number;
459 clientX: number;
460 clientY: number;
461 offsetX: number;
462 offsetY: number;
463 pageX: number;
464 pageY: number;
465 screenX: number;
466 screenY: number;
467}
468
469interface JQueryKeyEventObject extends JQueryInputEventObject {
470 char: any;
471 charCode: number;
472 key: any;
473 keyCode: number;
474}
475
476interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject{
477}
478
479/*
480 Collection of properties of the current browser
481*/
482
483interface JQuerySupport {
484 ajax?: boolean;
485 boxModel?: boolean;
486 changeBubbles?: boolean;
487 checkClone?: boolean;
488 checkOn?: boolean;
489 cors?: boolean;
490 cssFloat?: boolean;
491 hrefNormalized?: boolean;
492 htmlSerialize?: boolean;
493 leadingWhitespace?: boolean;
494 noCloneChecked?: boolean;
495 noCloneEvent?: boolean;
496 opacity?: boolean;
497 optDisabled?: boolean;
498 optSelected?: boolean;
499 scriptEval? (): boolean;
500 style?: boolean;
501 submitBubbles?: boolean;
502 tbody?: boolean;
503}
504
505interface JQueryParam {
506 /**
507 * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
508 *
509 * @param obj An array or object to serialize.
510 */
511 (obj: any): string;
512
513 /**
514 * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
515 *
516 * @param obj An array or object to serialize.
517 * @param traditional A Boolean indicating whether to perform a traditional "shallow" serialization.
518 */
519 (obj: any, traditional: boolean): string;
520}
521
522/**
523 * The interface used to construct jQuery events (with $.Event). It is
524 * defined separately instead of inline in JQueryStatic to allow
525 * overriding the construction function with specific strings
526 * returning specific event objects.
527 */
528interface JQueryEventConstructor {
529 (name: string, eventProperties?: any): JQueryEventObject;
530 new (name: string, eventProperties?: any): JQueryEventObject;
531}
532
533/**
534 * The interface used to specify coordinates.
535 */
536interface JQueryCoordinates {
537 left: number;
538 top: number;
539}
540
541/**
542 * Elements in the array returned by serializeArray()
543 */
544interface JQuerySerializeArrayElement {
545 name: string;
546 value: string;
547}
548
549interface JQueryAnimationOptions {
550 /**
551 * A string or number determining how long the animation will run.
552 */
553 duration?: any;
554 /**
555 * A string indicating which easing function to use for the transition.
556 */
557 easing?: string;
558 /**
559 * A function to call once the animation is complete.
560 */
561 complete?: Function;
562 /**
563 * 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.
564 */
565 step?: (now: number, tween: any) => any;
566 /**
567 * 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)
568 */
569 progress?: (animation: JQueryPromise<any>, progress: number, remainingMs: number) => any;
570 /**
571 * A function to call when the animation begins. (version added: 1.8)
572 */
573 start?: (animation: JQueryPromise<any>) => any;
574 /**
575 * A function to be called when the animation completes (its Promise object is resolved). (version added: 1.8)
576 */
577 done?: (animation: JQueryPromise<any>, jumpedToEnd: boolean) => any;
578 /**
579 * A function to be called when the animation fails to complete (its Promise object is rejected). (version added: 1.8)
580 */
581 fail?: (animation: JQueryPromise<any>, jumpedToEnd: boolean) => any;
582 /**
583 * 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)
584 */
585 always?: (animation: JQueryPromise<any>, jumpedToEnd: boolean) => any;
586 /**
587 * 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.
588 */
589 queue?: any;
590 /**
591 * A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. (version added: 1.4)
592 */
593 specialEasing?: Object;
594}
595
596interface JQueryEasingFunction {
597 ( percent: number ): number;
598}
599
600interface JQueryEasingFunctions {
601 [ name: string ]: JQueryEasingFunction;
602 linear: JQueryEasingFunction;
603 swing: JQueryEasingFunction;
604}
605
606/**
607 * Static members of jQuery (those on $ and jQuery themselves)
608 */
609interface JQueryStatic {
610
611 /**
612 * Perform an asynchronous HTTP (Ajax) request.
613 *
614 * @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().
615 */
616 ajax(settings: JQueryAjaxSettings): JQueryXHR;
617 /**
618 * Perform an asynchronous HTTP (Ajax) request.
619 *
620 * @param url A string containing the URL to which the request is sent.
621 * @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().
622 */
623 ajax(url: string, settings?: JQueryAjaxSettings): JQueryXHR;
624
625 /**
626 * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().
627 *
628 * @param dataTypes An optional string containing one or more space-separated dataTypes
629 * @param handler A handler to set default values for future Ajax requests.
630 */
631 ajaxPrefilter(dataTypes: string, handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void;
632 /**
633 * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().
634 *
635 * @param handler A handler to set default values for future Ajax requests.
636 */
637 ajaxPrefilter(handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void;
638
639 ajaxSettings: JQueryAjaxSettings;
640
641 /**
642 * Set default values for future Ajax requests. Its use is not recommended.
643 *
644 * @param options A set of key/value pairs that configure the default Ajax request. All options are optional.
645 */
646 ajaxSetup(options: JQueryAjaxSettings): void;
647
648 /**
649 * Load data from the server using a HTTP GET request.
650 *
651 * @param url A string containing the URL to which the request is sent.
652 * @param success A callback function that is executed if the request succeeds.
653 * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
654 */
655 get(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
656 /**
657 * Load data from the server using a HTTP GET request.
658 *
659 * @param url A string containing the URL to which the request is sent.
660 * @param data A plain object or string that is sent to the server with the request.
661 * @param success A callback function that is executed if the request succeeds.
662 * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
663 */
664 get(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
665 /**
666 * Load data from the server using a HTTP GET request.
667 *
668 * @param settings The JQueryAjaxSettings to be used for the request
669 */
670 get(settings : JQueryAjaxSettings): JQueryXHR;
671 /**
672 * Load JSON-encoded data from the server using a GET HTTP request.
673 *
674 * @param url A string containing the URL to which the request is sent.
675 * @param success A callback function that is executed if the request succeeds.
676 */
677 getJSON(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
678 /**
679 * Load JSON-encoded data from the server using a GET HTTP request.
680 *
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 */
685 getJSON(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
686 /**
687 * Load a JavaScript file from the server using a GET HTTP request, then execute it.
688 *
689 * @param url A string containing the URL to which the request is sent.
690 * @param success A callback function that is executed if the request succeeds.
691 */
692 getScript(url: string, success?: (script: string, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
693
694 /**
695 * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
696 */
697 param: JQueryParam;
698
699 /**
700 * Load data from the server using a HTTP POST request.
701 *
702 * @param url A string containing the URL to which the request is sent.
703 * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case.
704 * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
705 */
706 post(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
707 /**
708 * Load data from the server using a HTTP POST request.
709 *
710 * @param url A string containing the URL to which the request is sent.
711 * @param data A plain object or string that is sent to the server with the request.
712 * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case.
713 * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
714 */
715 post(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
716 /**
717 * Load data from the server using a HTTP POST request.
718 *
719 * @param settings The JQueryAjaxSettings to be used for the request
720 */
721 post(settings : JQueryAjaxSettings): JQueryXHR;
722 /**
723 * A multi-purpose callbacks list object that provides a powerful way to manage callback lists.
724 *
725 * @param flags An optional list of space-separated flags that change how the callback list behaves.
726 */
727 Callbacks(flags?: string): JQueryCallback;
728
729 /**
730 * Holds or releases the execution of jQuery's ready event.
731 *
732 * @param hold Indicates whether the ready hold is being requested or released
733 */
734 holdReady(hold: boolean): void;
735
736 /**
737 * Accepts a string containing a CSS selector which is then used to match a set of elements.
738 *
739 * @param selector A string containing a selector expression
740 * @param context A DOM Element, Document, or jQuery to use as context
741 */
742 (selector: string, context?: Element|JQuery): JQuery;
743
744 /**
745 * Accepts a string containing a CSS selector which is then used to match a set of elements.
746 *
747 * @param element A DOM element to wrap in a jQuery object.
748 */
749 (element: Element): JQuery;
750
751 /**
752 * Accepts a string containing a CSS selector which is then used to match a set of elements.
753 *
754 * @param elementArray An array containing a set of DOM elements to wrap in a jQuery object.
755 */
756 (elementArray: Element[]): JQuery;
757
758 /**
759 * Binds a function to be executed when the DOM has finished loading.
760 *
761 * @param callback A function to execute after the DOM is ready.
762 */
763 (callback: (jQueryAlias?: JQueryStatic) => any): JQuery;
764
765 /**
766 * Accepts a string containing a CSS selector which is then used to match a set of elements.
767 *
768 * @param object A plain object to wrap in a jQuery object.
769 */
770 (object: {}): JQuery;
771
772 /**
773 * Accepts a string containing a CSS selector which is then used to match a set of elements.
774 *
775 * @param object An existing jQuery object to clone.
776 */
777 (object: JQuery): JQuery;
778
779 /**
780 * Specify a function to execute when the DOM is fully loaded.
781 */
782 (): JQuery;
783
784 /**
785 * Creates DOM elements on the fly from the provided string of raw HTML.
786 *
787 * @param html A string of HTML to create on the fly. Note that this parses HTML, not XML.
788 * @param ownerDocument A document in which the new elements will be created.
789 */
790 (html: string, ownerDocument?: Document): JQuery;
791
792 /**
793 * Creates DOM elements on the fly from the provided string of raw HTML.
794 *
795 * @param html A string defining a single, standalone, HTML element (e.g. <div/> or <div></div>).
796 * @param attributes An object of attributes, events, and methods to call on the newly-created element.
797 */
798 (html: string, attributes: Object): JQuery;
799
800 /**
801 * Relinquish jQuery's control of the $ variable.
802 *
803 * @param removeAll A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself).
804 */
805 noConflict(removeAll?: boolean): JQueryStatic;
806
807 /**
808 * Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events.
809 *
810 * @param deferreds One or more Deferred objects, or plain JavaScript objects.
811 */
812 when<T>(...deferreds: Array<T|JQueryPromise<T>/* as JQueryDeferred<T> */>): JQueryPromise<T>;
813
814 /**
815 * Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties.
816 */
817 cssHooks: { [key: string]: any; };
818 cssNumber: any;
819
820 /**
821 * Store arbitrary data associated with the specified element. Returns the value that was set.
822 *
823 * @param element The DOM element to associate with the data.
824 * @param key A string naming the piece of data to set.
825 * @param value The new data value.
826 */
827 data<T>(element: Element, key: string, value: T): T;
828 /**
829 * 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.
830 *
831 * @param element The DOM element to associate with the data.
832 * @param key A string naming the piece of data to set.
833 */
834 data(element: Element, key: string): any;
835 /**
836 * 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.
837 *
838 * @param element The DOM element to associate with the data.
839 */
840 data(element: Element): any;
841
842 /**
843 * Execute the next function on the queue for the matched element.
844 *
845 * @param element A DOM element from which to remove and execute a queued function.
846 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
847 */
848 dequeue(element: Element, queueName?: string): void;
849
850 /**
851 * Determine whether an element has any jQuery data associated with it.
852 *
853 * @param element A DOM element to be checked for data.
854 */
855 hasData(element: Element): boolean;
856
857 /**
858 * Show the queue of functions to be executed on the matched element.
859 *
860 * @param element A DOM element to inspect for an attached queue.
861 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
862 */
863 queue(element: Element, queueName?: string): any[];
864 /**
865 * Manipulate the queue of functions to be executed on the matched element.
866 *
867 * @param element A DOM element where the array of queued functions is attached.
868 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
869 * @param newQueue An array of functions to replace the current queue contents.
870 */
871 queue(element: Element, queueName: string, newQueue: Function[]): JQuery;
872 /**
873 * Manipulate the queue of functions to be executed on the matched element.
874 *
875 * @param element A DOM element on which to add a queued function.
876 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
877 * @param callback The new function to add to the queue.
878 */
879 queue(element: Element, queueName: string, callback: Function): JQuery;
880
881 /**
882 * Remove a previously-stored piece of data.
883 *
884 * @param element A DOM element from which to remove data.
885 * @param name A string naming the piece of data to remove.
886 */
887 removeData(element: Element, name?: string): JQuery;
888
889 /**
890 * 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.
891 *
892 * @param beforeStart A function that is called just before the constructor returns.
893 */
894 Deferred<T>(beforeStart?: (deferred: JQueryDeferred<T>) => any): JQueryDeferred<T>;
895
896 /**
897 * Effects
898 */
899
900 easing: JQueryEasingFunctions;
901
902 fx: {
903 tick: () => void;
904 /**
905 * The rate (in milliseconds) at which animations fire.
906 */
907 interval: number;
908 stop: () => void;
909 speeds: { slow: number; fast: number; };
910 /**
911 * Globally disable all animations.
912 */
913 off: boolean;
914 step: any;
915 };
916
917 /**
918 * Takes a function and returns a new one that will always have a particular context.
919 *
920 * @param fnction The function whose context will be changed.
921 * @param context The object to which the context (this) of the function should be set.
922 * @param additionalArguments Any number of arguments to be passed to the function referenced in the function argument.
923 */
924 proxy(fnction: (...args: any[]) => any, context: Object, ...additionalArguments: any[]): any;
925 /**
926 * Takes a function and returns a new one that will always have a particular context.
927 *
928 * @param context The object to which the context (this) of the function should be set.
929 * @param name The name of the function whose context will be changed (should be a property of the context object).
930 * @param additionalArguments Any number of arguments to be passed to the function named in the name argument.
931 */
932 proxy(context: Object, name: string, ...additionalArguments: any[]): any;
933
934 Event: JQueryEventConstructor;
935
936 /**
937 * Takes a string and throws an exception containing it.
938 *
939 * @param message The message to send out.
940 */
941 error(message: any): JQuery;
942
943 expr: any;
944 fn: any; //TODO: Decide how we want to type this
945
946 isReady: boolean;
947
948 // Properties
949 support: JQuerySupport;
950
951 /**
952 * Check to see if a DOM element is a descendant of another DOM element.
953 *
954 * @param container The DOM element that may contain the other element.
955 * @param contained The DOM element that may be contained by (a descendant of) the other element.
956 */
957 contains(container: Element, contained: Element): boolean;
958
959 /**
960 * 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.
961 *
962 * @param collection The object or array to iterate over.
963 * @param callback The function that will be executed on every object.
964 */
965 each<T>(
966 collection: T[],
967 callback: (indexInArray: number, valueOfElement: T) => any
968 ): any;
969
970 /**
971 * 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.
972 *
973 * @param collection The object or array to iterate over.
974 * @param callback The function that will be executed on every object.
975 */
976 each(
977 collection: any,
978 callback: (indexInArray: any, valueOfElement: any) => any
979 ): any;
980
981 /**
982 * Merge the contents of two or more objects together into the first object.
983 *
984 * @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.
985 * @param object1 An object containing additional properties to merge in.
986 * @param objectN Additional objects containing properties to merge in.
987 */
988 extend(target: any, object1?: any, ...objectN: any[]): any;
989 /**
990 * Merge the contents of two or more objects together into the first object.
991 *
992 * @param deep If true, the merge becomes recursive (aka. deep copy).
993 * @param target The object to extend. It will receive the new properties.
994 * @param object1 An object containing additional properties to merge in.
995 * @param objectN Additional objects containing properties to merge in.
996 */
997 extend(deep: boolean, target: any, object1?: any, ...objectN: any[]): any;
998
999 /**
1000 * Execute some JavaScript code globally.
1001 *
1002 * @param code The JavaScript code to execute.
1003 */
1004 globalEval(code: string): any;
1005
1006 /**
1007 * Finds the elements of an array which satisfy a filter function. The original array is not affected.
1008 *
1009 * @param array The array to search through.
1010 * @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.
1011 * @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.
1012 */
1013 grep<T>(array: T[], func: (elementOfArray?: T, indexInArray?: number) => boolean, invert?: boolean): T[];
1014
1015 /**
1016 * Search for a specified value within an array and return its index (or -1 if not found).
1017 *
1018 * @param value The value to search for.
1019 * @param array An array through which to search.
1020 * @param fromIndex he index of the array at which to begin the search. The default is 0, which will search the whole array.
1021 */
1022 inArray<T>(value: T, array: T[], fromIndex?: number): number;
1023
1024 /**
1025 * Determine whether the argument is an array.
1026 *
1027 * @param obj Object to test whether or not it is an array.
1028 */
1029 isArray(obj: any): boolean;
1030 /**
1031 * Check to see if an object is empty (contains no enumerable properties).
1032 *
1033 * @param obj The object that will be checked to see if it's empty.
1034 */
1035 isEmptyObject(obj: any): boolean;
1036 /**
1037 * Determine if the argument passed is a Javascript function object.
1038 *
1039 * @param obj Object to test whether or not it is a function.
1040 */
1041 isFunction(obj: any): boolean;
1042 /**
1043 * Determines whether its argument is a number.
1044 *
1045 * @param obj The value to be tested.
1046 */
1047 isNumeric(value: any): boolean;
1048 /**
1049 * Check to see if an object is a plain object (created using "{}" or "new Object").
1050 *
1051 * @param obj The object that will be checked to see if it's a plain object.
1052 */
1053 isPlainObject(obj: any): boolean;
1054 /**
1055 * Determine whether the argument is a window.
1056 *
1057 * @param obj Object to test whether or not it is a window.
1058 */
1059 isWindow(obj: any): boolean;
1060 /**
1061 * Check to see if a DOM node is within an XML document (or is an XML document).
1062 *
1063 * @param node he DOM node that will be checked to see if it's in an XML document.
1064 */
1065 isXMLDoc(node: Node): boolean;
1066
1067 /**
1068 * Convert an array-like object into a true JavaScript array.
1069 *
1070 * @param obj Any object to turn into a native Array.
1071 */
1072 makeArray(obj: any): any[];
1073
1074 /**
1075 * Translate all items in an array or object to new array of items.
1076 *
1077 * @param array The Array to translate.
1078 * @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.
1079 */
1080 map<T, U>(array: T[], callback: (elementOfArray?: T, indexInArray?: number) => U): U[];
1081 /**
1082 * Translate all items in an array or object to new array of items.
1083 *
1084 * @param arrayOrObject The Array or Object to translate.
1085 * @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.
1086 */
1087 map(arrayOrObject: any, callback: (value?: any, indexOrKey?: any) => any): any;
1088
1089 /**
1090 * Merge the contents of two arrays together into the first array.
1091 *
1092 * @param first The first array to merge, the elements of second added.
1093 * @param second The second array to merge into the first, unaltered.
1094 */
1095 merge<T>(first: T[], second: T[]): T[];
1096
1097 /**
1098 * An empty function.
1099 */
1100 noop(): any;
1101
1102 /**
1103 * Return a number representing the current time.
1104 */
1105 now(): number;
1106
1107 /**
1108 * Takes a well-formed JSON string and returns the resulting JavaScript object.
1109 *
1110 * @param json The JSON string to parse.
1111 */
1112 parseJSON(json: string): any;
1113
1114 /**
1115 * Parses a string into an XML document.
1116 *
1117 * @param data a well-formed XML string to be parsed
1118 */
1119 parseXML(data: string): XMLDocument;
1120
1121 /**
1122 * Remove the whitespace from the beginning and end of a string.
1123 *
1124 * @param str Remove the whitespace from the beginning and end of a string.
1125 */
1126 trim(str: string): string;
1127
1128 /**
1129 * Determine the internal JavaScript [[Class]] of an object.
1130 *
1131 * @param obj Object to get the internal JavaScript [[Class]] of.
1132 */
1133 type(obj: any): string;
1134
1135 /**
1136 * 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.
1137 *
1138 * @param array The Array of DOM elements.
1139 */
1140 unique(array: Element[]): Element[];
1141
1142 /**
1143 * Parses a string into an array of DOM nodes.
1144 *
1145 * @param data HTML string to be parsed
1146 * @param context DOM element to serve as the context in which the HTML fragment will be created
1147 * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string
1148 */
1149 parseHTML(data: string, context?: HTMLElement, keepScripts?: boolean): any[];
1150
1151 /**
1152 * Parses a string into an array of DOM nodes.
1153 *
1154 * @param data HTML string to be parsed
1155 * @param context DOM element to serve as the context in which the HTML fragment will be created
1156 * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string
1157 */
1158 parseHTML(data: string, context?: Document, keepScripts?: boolean): any[];
1159}
1160
1161/**
1162 * The jQuery instance members
1163 */
1164interface JQuery {
1165 /**
1166 * Register a handler to be called when Ajax requests complete. This is an AjaxEvent.
1167 *
1168 * @param handler The function to be invoked.
1169 */
1170 ajaxComplete(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: any) => any): JQuery;
1171 /**
1172 * Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event.
1173 *
1174 * @param handler The function to be invoked.
1175 */
1176 ajaxError(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxSettings: JQueryAjaxSettings, thrownError: any) => any): JQuery;
1177 /**
1178 * Attach a function to be executed before an Ajax request is sent. This is an Ajax Event.
1179 *
1180 * @param handler The function to be invoked.
1181 */
1182 ajaxSend(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxOptions: JQueryAjaxSettings) => any): JQuery;
1183 /**
1184 * Register a handler to be called when the first Ajax request begins. This is an Ajax Event.
1185 *
1186 * @param handler The function to be invoked.
1187 */
1188 ajaxStart(handler: () => any): JQuery;
1189 /**
1190 * Register a handler to be called when all Ajax requests have completed. This is an Ajax Event.
1191 *
1192 * @param handler The function to be invoked.
1193 */
1194 ajaxStop(handler: () => any): JQuery;
1195 /**
1196 * Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.
1197 *
1198 * @param handler The function to be invoked.
1199 */
1200 ajaxSuccess(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: JQueryAjaxSettings) => any): JQuery;
1201
1202 /**
1203 * Load data from the server and place the returned HTML into the matched element.
1204 *
1205 * @param url A string containing the URL to which the request is sent.
1206 * @param data A plain object or string that is sent to the server with the request.
1207 * @param complete A callback function that is executed when the request completes.
1208 */
1209 load(url: string, data?: string|Object, complete?: (responseText: string, textStatus: string, XMLHttpRequest: XMLHttpRequest) => any): JQuery;
1210
1211 /**
1212 * Encode a set of form elements as a string for submission.
1213 */
1214 serialize(): string;
1215 /**
1216 * Encode a set of form elements as an array of names and values.
1217 */
1218 serializeArray(): JQuerySerializeArrayElement[];
1219
1220 /**
1221 * Adds the specified class(es) to each of the set of matched elements.
1222 *
1223 * @param className One or more space-separated classes to be added to the class attribute of each matched element.
1224 */
1225 addClass(className: string): JQuery;
1226 /**
1227 * Adds the specified class(es) to each of the set of matched elements.
1228 *
1229 * @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.
1230 */
1231 addClass(func: (index: number, className: string) => string): JQuery;
1232
1233 /**
1234 * Add the previous set of elements on the stack to the current set, optionally filtered by a selector.
1235 */
1236 addBack(selector?: string): JQuery;
1237
1238 /**
1239 * Get the value of an attribute for the first element in the set of matched elements.
1240 *
1241 * @param attributeName The name of the attribute to get.
1242 */
1243 attr(attributeName: string): string;
1244 /**
1245 * Set one or more attributes for the set of matched elements.
1246 *
1247 * @param attributeName The name of the attribute to set.
1248 * @param value A value to set for the attribute.
1249 */
1250 attr(attributeName: string, value: string|number): JQuery;
1251 /**
1252 * Set one or more attributes for the set of matched elements.
1253 *
1254 * @param attributeName The name of the attribute to set.
1255 * @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.
1256 */
1257 attr(attributeName: string, func: (index: number, attr: string) => string|number): JQuery;
1258 /**
1259 * Set one or more attributes for the set of matched elements.
1260 *
1261 * @param attributes An object of attribute-value pairs to set.
1262 */
1263 attr(attributes: Object): JQuery;
1264
1265 /**
1266 * Determine whether any of the matched elements are assigned the given class.
1267 *
1268 * @param className The class name to search for.
1269 */
1270 hasClass(className: string): boolean;
1271
1272 /**
1273 * Get the HTML contents of the first element in the set of matched elements.
1274 */
1275 html(): string;
1276 /**
1277 * Set the HTML contents of each element in the set of matched elements.
1278 *
1279 * @param htmlString A string of HTML to set as the content of each matched element.
1280 */
1281 html(htmlString: string): JQuery;
1282 /**
1283 * Set the HTML contents of each element in the set of matched elements.
1284 *
1285 * @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.
1286 */
1287 html(func: (index: number, oldhtml: string) => string): JQuery;
1288 /**
1289 * Set the HTML contents of each element in the set of matched elements.
1290 *
1291 * @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.
1292 */
1293
1294 /**
1295 * Get the value of a property for the first element in the set of matched elements.
1296 *
1297 * @param propertyName The name of the property to get.
1298 */
1299 prop(propertyName: string): any;
1300 /**
1301 * Set one or more properties for the set of matched elements.
1302 *
1303 * @param propertyName The name of the property to set.
1304 * @param value A value to set for the property.
1305 */
1306 prop(propertyName: string, value: string|number|boolean): JQuery;
1307 /**
1308 * Set one or more properties for the set of matched elements.
1309 *
1310 * @param properties An object of property-value pairs to set.
1311 */
1312 prop(properties: Object): JQuery;
1313 /**
1314 * Set one or more properties for the set of matched elements.
1315 *
1316 * @param propertyName The name of the property to set.
1317 * @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.
1318 */
1319 prop(propertyName: string, func: (index: number, oldPropertyValue: any) => any): JQuery;
1320
1321 /**
1322 * Remove an attribute from each element in the set of matched elements.
1323 *
1324 * @param attributeName An attribute to remove; as of version 1.7, it can be a space-separated list of attributes.
1325 */
1326 removeAttr(attributeName: string): JQuery;
1327
1328 /**
1329 * Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
1330 *
1331 * @param className One or more space-separated classes to be removed from the class attribute of each matched element.
1332 */
1333 removeClass(className?: string): JQuery;
1334 /**
1335 * Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
1336 *
1337 * @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.
1338 */
1339 removeClass(func: (index: number, className: string) => string): JQuery;
1340
1341 /**
1342 * Remove a property for the set of matched elements.
1343 *
1344 * @param propertyName The name of the property to remove.
1345 */
1346 removeProp(propertyName: string): JQuery;
1347
1348 /**
1349 * 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.
1350 *
1351 * @param className One or more class names (separated by spaces) to be toggled for each element in the matched set.
1352 * @param swtch A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed.
1353 */
1354 toggleClass(className: string, swtch?: boolean): JQuery;
1355 /**
1356 * 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.
1357 *
1358 * @param swtch A boolean value to determine whether the class should be added or removed.
1359 */
1360 toggleClass(swtch?: boolean): JQuery;
1361 /**
1362 * 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.
1363 *
1364 * @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.
1365 * @param swtch A boolean value to determine whether the class should be added or removed.
1366 */
1367 toggleClass(func: (index: number, className: string, swtch: boolean) => string, swtch?: boolean): JQuery;
1368
1369 /**
1370 * Get the current value of the first element in the set of matched elements.
1371 */
1372 val(): any;
1373 /**
1374 * Set the value of each element in the set of matched elements.
1375 *
1376 * @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.
1377 */
1378 val(value: string|string[]|number): JQuery;
1379 /**
1380 * Set the value of each element in the set of matched elements.
1381 *
1382 * @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.
1383 */
1384 val(func: (index: number, value: string) => string): JQuery;
1385
1386
1387 /**
1388 * Get the value of style properties for the first element in the set of matched elements.
1389 *
1390 * @param propertyName A CSS property.
1391 */
1392 css(propertyName: string): string;
1393 /**
1394 * Set one or more CSS properties for the set of matched elements.
1395 *
1396 * @param propertyName A CSS property name.
1397 * @param value A value to set for the property.
1398 */
1399 css(propertyName: string, value: string|number): JQuery;
1400 /**
1401 * Set one or more CSS properties for the set of matched elements.
1402 *
1403 * @param propertyName A CSS property name.
1404 * @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.
1405 */
1406 css(propertyName: string, value: (index: number, value: string) => string|number): JQuery;
1407 /**
1408 * Set one or more CSS properties for the set of matched elements.
1409 *
1410 * @param properties An object of property-value pairs to set.
1411 */
1412 css(properties: Object): JQuery;
1413
1414 /**
1415 * Get the current computed height for the first element in the set of matched elements.
1416 */
1417 height(): number;
1418 /**
1419 * Set the CSS height of every matched element.
1420 *
1421 * @param value An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string).
1422 */
1423 height(value: number|string): JQuery;
1424 /**
1425 * Set the CSS height of every matched element.
1426 *
1427 * @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.
1428 */
1429 height(func: (index: number, height: number) => number|string): JQuery;
1430
1431 /**
1432 * Get the current computed height for the first element in the set of matched elements, including padding but not border.
1433 */
1434 innerHeight(): number;
1435
1436 /**
1437 * Sets the inner height on elements in the set of matched elements, including padding but not border.
1438 *
1439 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1440 */
1441 innerHeight(height: number|string): JQuery;
1442
1443 /**
1444 * Get the current computed width for the first element in the set of matched elements, including padding but not border.
1445 */
1446 innerWidth(): number;
1447
1448 /**
1449 * Sets the inner width on elements in the set of matched elements, including padding but not border.
1450 *
1451 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1452 */
1453 innerWidth(width: number|string): JQuery;
1454
1455 /**
1456 * Get the current coordinates of the first element in the set of matched elements, relative to the document.
1457 */
1458 offset(): JQueryCoordinates;
1459 /**
1460 * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
1461 *
1462 * @param coordinates An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
1463 */
1464 offset(coordinates: JQueryCoordinates): JQuery;
1465 /**
1466 * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
1467 *
1468 * @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.
1469 */
1470 offset(func: (index: number, coords: JQueryCoordinates) => JQueryCoordinates): JQuery;
1471
1472 /**
1473 * 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.
1474 *
1475 * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation.
1476 */
1477 outerHeight(includeMargin?: boolean): number;
1478
1479 /**
1480 * Sets the outer height on elements in the set of matched elements, including padding and border.
1481 *
1482 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1483 */
1484 outerHeight(height: number|string): JQuery;
1485
1486 /**
1487 * Get the current computed width for the first element in the set of matched elements, including padding and border.
1488 *
1489 * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation.
1490 */
1491 outerWidth(includeMargin?: boolean): number;
1492
1493 /**
1494 * Sets the outer width on elements in the set of matched elements, including padding and border.
1495 *
1496 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1497 */
1498 outerWidth(width: number|string): JQuery;
1499
1500 /**
1501 * Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.
1502 */
1503 position(): JQueryCoordinates;
1504
1505 /**
1506 * 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.
1507 */
1508 scrollLeft(): number;
1509 /**
1510 * Set the current horizontal position of the scroll bar for each of the set of matched elements.
1511 *
1512 * @param value An integer indicating the new position to set the scroll bar to.
1513 */
1514 scrollLeft(value: number): JQuery;
1515
1516 /**
1517 * 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.
1518 */
1519 scrollTop(): number;
1520 /**
1521 * Set the current vertical position of the scroll bar for each of the set of matched elements.
1522 *
1523 * @param value An integer indicating the new position to set the scroll bar to.
1524 */
1525 scrollTop(value: number): JQuery;
1526
1527 /**
1528 * Get the current computed width for the first element in the set of matched elements.
1529 */
1530 width(): number;
1531 /**
1532 * Set the CSS width of each element in the set of matched elements.
1533 *
1534 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
1535 */
1536 width(value: number|string): JQuery;
1537 /**
1538 * Set the CSS width of each element in the set of matched elements.
1539 *
1540 * @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.
1541 */
1542 width(func: (index: number, width: number) => number|string): JQuery;
1543
1544 /**
1545 * Remove from the queue all items that have not yet been run.
1546 *
1547 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
1548 */
1549 clearQueue(queueName?: string): JQuery;
1550
1551 /**
1552 * Store arbitrary data associated with the matched elements.
1553 *
1554 * @param key A string naming the piece of data to set.
1555 * @param value The new data value; it can be any Javascript type including Array or Object.
1556 */
1557 data(key: string, value: any): JQuery;
1558 /**
1559 * 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.
1560 *
1561 * @param key Name of the data stored.
1562 */
1563 data(key: string): any;
1564 /**
1565 * Store arbitrary data associated with the matched elements.
1566 *
1567 * @param obj An object of key-value pairs of data to update.
1568 */
1569 data(obj: { [key: string]: any; }): JQuery;
1570 /**
1571 * 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.
1572 */
1573 data(): any;
1574
1575 /**
1576 * Execute the next function on the queue for the matched elements.
1577 *
1578 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
1579 */
1580 dequeue(queueName?: string): JQuery;
1581
1582 /**
1583 * Remove a previously-stored piece of data.
1584 *
1585 * @param name A string naming the piece of data to delete or space-separated string naming the pieces of data to delete.
1586 */
1587 removeData(name: string): JQuery;
1588 /**
1589 * Remove a previously-stored piece of data.
1590 *
1591 * @param list An array of strings naming the pieces of data to delete.
1592 */
1593 removeData(list: string[]): JQuery;
1594 /**
1595 * Remove all previously-stored piece of data.
1596 */
1597 removeData(): JQuery;
1598
1599 /**
1600 * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.
1601 *
1602 * @param type The type of queue that needs to be observed. (default: fx)
1603 * @param target Object onto which the promise methods have to be attached
1604 */
1605 promise(type?: string, target?: Object): JQueryPromise<any>;
1606
1607 /**
1608 * Perform a custom animation of a set of CSS properties.
1609 *
1610 * @param properties An object of CSS properties and values that the animation will move toward.
1611 * @param duration A string or number determining how long the animation will run.
1612 * @param complete A function to call once the animation is complete.
1613 */
1614 animate(properties: Object, duration?: string|number, complete?: Function): JQuery;
1615 /**
1616 * Perform a custom animation of a set of CSS properties.
1617 *
1618 * @param properties An object of CSS properties and values that the animation will move toward.
1619 * @param duration A string or number determining how long the animation will run.
1620 * @param easing A string indicating which easing function to use for the transition. (default: swing)
1621 * @param complete A function to call once the animation is complete.
1622 */
1623 animate(properties: Object, duration?: string|number, easing?: string, complete?: Function): JQuery;
1624 /**
1625 * Perform a custom animation of a set of CSS properties.
1626 *
1627 * @param properties An object of CSS properties and values that the animation will move toward.
1628 * @param options A map of additional options to pass to the method.
1629 */
1630 animate(properties: Object, options: JQueryAnimationOptions): JQuery;
1631
1632 /**
1633 * Set a timer to delay execution of subsequent items in the queue.
1634 *
1635 * @param duration An integer indicating the number of milliseconds to delay execution of the next item in the queue.
1636 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
1637 */
1638 delay(duration: number, queueName?: string): JQuery;
1639
1640 /**
1641 * Display the matched elements by fading them to opaque.
1642 *
1643 * @param duration A string or number determining how long the animation will run.
1644 * @param complete A function to call once the animation is complete.
1645 */
1646 fadeIn(duration?: number|string, complete?: Function): JQuery;
1647 /**
1648 * Display the matched elements by fading them to opaque.
1649 *
1650 * @param duration A string or number determining how long the animation will run.
1651 * @param easing A string indicating which easing function to use for the transition.
1652 * @param complete A function to call once the animation is complete.
1653 */
1654 fadeIn(duration?: number|string, easing?: string, complete?: Function): JQuery;
1655 /**
1656 * Display the matched elements by fading them to opaque.
1657 *
1658 * @param options A map of additional options to pass to the method.
1659 */
1660 fadeIn(options: JQueryAnimationOptions): JQuery;
1661
1662 /**
1663 * Hide the matched elements by fading them to transparent.
1664 *
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.
1667 */
1668 fadeOut(duration?: number|string, complete?: Function): JQuery;
1669 /**
1670 * Hide the matched elements by fading them to transparent.
1671 *
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.
1675 */
1676 fadeOut(duration?: number|string, easing?: string, complete?: Function): JQuery;
1677 /**
1678 * Hide the matched elements by fading them to transparent.
1679 *
1680 * @param options A map of additional options to pass to the method.
1681 */
1682 fadeOut(options: JQueryAnimationOptions): JQuery;
1683
1684 /**
1685 * Adjust the opacity of the matched elements.
1686 *
1687 * @param duration A string or number determining how long the animation will run.
1688 * @param opacity A number between 0 and 1 denoting the target opacity.
1689 * @param complete A function to call once the animation is complete.
1690 */
1691 fadeTo(duration: string|number, opacity: number, complete?: Function): JQuery;
1692 /**
1693 * Adjust the opacity of the matched elements.
1694 *
1695 * @param duration A string or number determining how long the animation will run.
1696 * @param opacity A number between 0 and 1 denoting the target opacity.
1697 * @param easing A string indicating which easing function to use for the transition.
1698 * @param complete A function to call once the animation is complete.
1699 */
1700 fadeTo(duration: string|number, opacity: number, easing?: string, complete?: Function): JQuery;
1701
1702 /**
1703 * Display or hide the matched elements by animating their opacity.
1704 *
1705 * @param duration A string or number determining how long the animation will run.
1706 * @param complete A function to call once the animation is complete.
1707 */
1708 fadeToggle(duration?: number|string, complete?: Function): JQuery;
1709 /**
1710 * Display or hide the matched elements by animating their opacity.
1711 *
1712 * @param duration A string or number determining how long the animation will run.
1713 * @param easing A string indicating which easing function to use for the transition.
1714 * @param complete A function to call once the animation is complete.
1715 */
1716 fadeToggle(duration?: number|string, easing?: string, complete?: Function): JQuery;
1717 /**
1718 * Display or hide the matched elements by animating their opacity.
1719 *
1720 * @param options A map of additional options to pass to the method.
1721 */
1722 fadeToggle(options: JQueryAnimationOptions): JQuery;
1723
1724 /**
1725 * Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements.
1726 *
1727 * @param queue The name of the queue in which to stop animations.
1728 */
1729 finish(queue?: string): JQuery;
1730
1731 /**
1732 * Hide the matched elements.
1733 *
1734 * @param duration A string or number determining how long the animation will run.
1735 * @param complete A function to call once the animation is complete.
1736 */
1737 hide(duration?: number|string, complete?: Function): JQuery;
1738 /**
1739 * Hide the matched elements.
1740 *
1741 * @param duration A string or number determining how long the animation will run.
1742 * @param easing A string indicating which easing function to use for the transition.
1743 * @param complete A function to call once the animation is complete.
1744 */
1745 hide(duration?: number|string, easing?: string, complete?: Function): JQuery;
1746 /**
1747 * Hide the matched elements.
1748 *
1749 * @param options A map of additional options to pass to the method.
1750 */
1751 hide(options: JQueryAnimationOptions): JQuery;
1752
1753 /**
1754 * Display the matched elements.
1755 *
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.
1758 */
1759 show(duration?: number|string, complete?: Function): JQuery;
1760 /**
1761 * Display the matched elements.
1762 *
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.
1766 */
1767 show(duration?: number|string, easing?: string, complete?: Function): JQuery;
1768 /**
1769 * Display the matched elements.
1770 *
1771 * @param options A map of additional options to pass to the method.
1772 */
1773 show(options: JQueryAnimationOptions): JQuery;
1774
1775 /**
1776 * Display the matched elements with a sliding motion.
1777 *
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.
1780 */
1781 slideDown(duration?: number|string, complete?: Function): JQuery;
1782 /**
1783 * Display the matched elements with a sliding motion.
1784 *
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.
1788 */
1789 slideDown(duration?: number|string, easing?: string, complete?: Function): JQuery;
1790 /**
1791 * Display the matched elements with a sliding motion.
1792 *
1793 * @param options A map of additional options to pass to the method.
1794 */
1795 slideDown(options: JQueryAnimationOptions): JQuery;
1796
1797 /**
1798 * Display or hide the matched elements with a sliding motion.
1799 *
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.
1802 */
1803 slideToggle(duration?: number|string, complete?: Function): JQuery;
1804 /**
1805 * Display or hide the matched elements with a sliding motion.
1806 *
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.
1810 */
1811 slideToggle(duration?: number|string, easing?: string, complete?: Function): JQuery;
1812 /**
1813 * Display or hide the matched elements with a sliding motion.
1814 *
1815 * @param options A map of additional options to pass to the method.
1816 */
1817 slideToggle(options: JQueryAnimationOptions): JQuery;
1818
1819 /**
1820 * Hide the matched elements with a sliding motion.
1821 *
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.
1824 */
1825 slideUp(duration?: number|string, complete?: Function): JQuery;
1826 /**
1827 * Hide the matched elements with a sliding motion.
1828 *
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.
1832 */
1833 slideUp(duration?: number|string, easing?: string, complete?: Function): JQuery;
1834 /**
1835 * Hide the matched elements with a sliding motion.
1836 *
1837 * @param options A map of additional options to pass to the method.
1838 */
1839 slideUp(options: JQueryAnimationOptions): JQuery;
1840
1841 /**
1842 * Stop the currently-running animation on the matched elements.
1843 *
1844 * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false.
1845 * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false.
1846 */
1847 stop(clearQueue?: boolean, jumpToEnd?: boolean): JQuery;
1848 /**
1849 * Stop the currently-running animation on the matched elements.
1850 *
1851 * @param queue The name of the queue in which to stop animations.
1852 * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false.
1853 * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false.
1854 */
1855 stop(queue?: string, clearQueue?: boolean, jumpToEnd?: boolean): JQuery;
1856
1857 /**
1858 * Display or hide the matched elements.
1859 *
1860 * @param duration A string or number determining how long the animation will run.
1861 * @param complete A function to call once the animation is complete.
1862 */
1863 toggle(duration?: number|string, complete?: Function): JQuery;
1864 /**
1865 * Display or hide the matched elements.
1866 *
1867 * @param duration A string or number determining how long the animation will run.
1868 * @param easing A string indicating which easing function to use for the transition.
1869 * @param complete A function to call once the animation is complete.
1870 */
1871 toggle(duration?: number|string, easing?: string, complete?: Function): JQuery;
1872 /**
1873 * Display or hide the matched elements.
1874 *
1875 * @param options A map of additional options to pass to the method.
1876 */
1877 toggle(options: JQueryAnimationOptions): JQuery;
1878 /**
1879 * Display or hide the matched elements.
1880 *
1881 * @param showOrHide A Boolean indicating whether to show or hide the elements.
1882 */
1883 toggle(showOrHide: boolean): JQuery;
1884
1885 /**
1886 * Attach a handler to an event for the elements.
1887 *
1888 * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1889 * @param eventData An object containing data that will be passed to the event handler.
1890 * @param handler A function to execute each time the event is triggered.
1891 */
1892 bind(eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
1893 /**
1894 * Attach a handler to an event for the elements.
1895 *
1896 * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1897 * @param handler A function to execute each time the event is triggered.
1898 */
1899 bind(eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
1900 /**
1901 * Attach a handler to an event for the elements.
1902 *
1903 * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1904 * @param eventData An object containing data that will be passed to the event handler.
1905 * @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.
1906 */
1907 bind(eventType: string, eventData: any, preventBubble: boolean): JQuery;
1908 /**
1909 * Attach a handler to an event for the elements.
1910 *
1911 * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1912 * @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.
1913 */
1914 bind(eventType: string, preventBubble: boolean): JQuery;
1915 /**
1916 * Attach a handler to an event for the elements.
1917 *
1918 * @param events An object containing one or more DOM event types and functions to execute for them.
1919 */
1920 bind(events: any): JQuery;
1921
1922 /**
1923 * Trigger the "blur" event on an element
1924 */
1925 blur(): JQuery;
1926 /**
1927 * Bind an event handler to the "blur" JavaScript event
1928 *
1929 * @param handler A function to execute each time the event is triggered.
1930 */
1931 blur(handler: (eventObject: JQueryEventObject) => any): JQuery;
1932 /**
1933 * Bind an event handler to the "blur" JavaScript event
1934 *
1935 * @param eventData An object containing data that will be passed to the event handler.
1936 * @param handler A function to execute each time the event is triggered.
1937 */
1938 blur(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
1939
1940 /**
1941 * Trigger the "change" event on an element.
1942 */
1943 change(): JQuery;
1944 /**
1945 * Bind an event handler to the "change" JavaScript event
1946 *
1947 * @param handler A function to execute each time the event is triggered.
1948 */
1949 change(handler: (eventObject: JQueryEventObject) => any): JQuery;
1950 /**
1951 * Bind an event handler to the "change" JavaScript event
1952 *
1953 * @param eventData An object containing data that will be passed to the event handler.
1954 * @param handler A function to execute each time the event is triggered.
1955 */
1956 change(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
1957
1958 /**
1959 * Trigger the "click" event on an element.
1960 */
1961 click(): JQuery;
1962 /**
1963 * Bind an event handler to the "click" JavaScript event
1964 *
1965 * @param eventData An object containing data that will be passed to the event handler.
1966 */
1967 click(handler: (eventObject: JQueryEventObject) => any): JQuery;
1968 /**
1969 * Bind an event handler to the "click" JavaScript event
1970 *
1971 * @param eventData An object containing data that will be passed to the event handler.
1972 * @param handler A function to execute each time the event is triggered.
1973 */
1974 click(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
1975
1976 /**
1977 * Trigger the "contextmenu" event on an element.
1978 */
1979 contextmenu(): JQuery;
1980 /**
1981 * Bind an event handler to the "contextmenu" JavaScript event.
1982 *
1983 * @param handler A function to execute when the event is triggered.
1984 */
1985 contextmenu(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
1986 /**
1987 * Bind an event handler to the "contextmenu" JavaScript event.
1988 *
1989 * @param eventData An object containing data that will be passed to the event handler.
1990 * @param handler A function to execute when the event is triggered.
1991 */
1992 contextmenu(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
1993
1994 /**
1995 * Trigger the "dblclick" event on an element.
1996 */
1997 dblclick(): JQuery;
1998 /**
1999 * Bind an event handler to the "dblclick" JavaScript event
2000 *
2001 * @param handler A function to execute each time the event is triggered.
2002 */
2003 dblclick(handler: (eventObject: JQueryEventObject) => any): JQuery;
2004 /**
2005 * Bind an event handler to the "dblclick" JavaScript event
2006 *
2007 * @param eventData An object containing data that will be passed to the event handler.
2008 * @param handler A function to execute each time the event is triggered.
2009 */
2010 dblclick(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2011
2012 delegate(selector: any, eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
2013 delegate(selector: any, eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
2014
2015 /**
2016 * Trigger the "focus" event on an element.
2017 */
2018 focus(): JQuery;
2019 /**
2020 * Bind an event handler to the "focus" JavaScript event
2021 *
2022 * @param handler A function to execute each time the event is triggered.
2023 */
2024 focus(handler: (eventObject: JQueryEventObject) => any): JQuery;
2025 /**
2026 * Bind an event handler to the "focus" JavaScript event
2027 *
2028 * @param eventData An object containing data that will be passed to the event handler.
2029 * @param handler A function to execute each time the event is triggered.
2030 */
2031 focus(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2032
2033 /**
2034 * Trigger the "focusin" event on an element.
2035 */
2036 focusin(): JQuery;
2037 /**
2038 * Bind an event handler to the "focusin" JavaScript event
2039 *
2040 * @param handler A function to execute each time the event is triggered.
2041 */
2042 focusin(handler: (eventObject: JQueryEventObject) => any): JQuery;
2043 /**
2044 * Bind an event handler to the "focusin" JavaScript event
2045 *
2046 * @param eventData An object containing data that will be passed to the event handler.
2047 * @param handler A function to execute each time the event is triggered.
2048 */
2049 focusin(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2050
2051 /**
2052 * Trigger the "focusout" event on an element.
2053 */
2054 focusout(): JQuery;
2055 /**
2056 * Bind an event handler to the "focusout" JavaScript event
2057 *
2058 * @param handler A function to execute each time the event is triggered.
2059 */
2060 focusout(handler: (eventObject: JQueryEventObject) => any): JQuery;
2061 /**
2062 * Bind an event handler to the "focusout" JavaScript event
2063 *
2064 * @param eventData An object containing data that will be passed to the event handler.
2065 * @param handler A function to execute each time the event is triggered.
2066 */
2067 focusout(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2068
2069 /**
2070 * Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.
2071 *
2072 * @param handlerIn A function to execute when the mouse pointer enters the element.
2073 * @param handlerOut A function to execute when the mouse pointer leaves the element.
2074 */
2075 hover(handlerIn: (eventObject: JQueryEventObject) => any, handlerOut: (eventObject: JQueryEventObject) => any): JQuery;
2076 /**
2077 * Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements.
2078 *
2079 * @param handlerInOut A function to execute when the mouse pointer enters or leaves the element.
2080 */
2081 hover(handlerInOut: (eventObject: JQueryEventObject) => any): JQuery;
2082
2083 /**
2084 * Trigger the "keydown" event on an element.
2085 */
2086 keydown(): JQuery;
2087 /**
2088 * Bind an event handler to the "keydown" JavaScript event
2089 *
2090 * @param handler A function to execute each time the event is triggered.
2091 */
2092 keydown(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
2093 /**
2094 * Bind an event handler to the "keydown" JavaScript event
2095 *
2096 * @param eventData An object containing data that will be passed to the event handler.
2097 * @param handler A function to execute each time the event is triggered.
2098 */
2099 keydown(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
2100
2101 /**
2102 * Trigger the "keypress" event on an element.
2103 */
2104 keypress(): JQuery;
2105 /**
2106 * Bind an event handler to the "keypress" JavaScript event
2107 *
2108 * @param handler A function to execute each time the event is triggered.
2109 */
2110 keypress(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
2111 /**
2112 * Bind an event handler to the "keypress" JavaScript event
2113 *
2114 * @param eventData An object containing data that will be passed to the event handler.
2115 * @param handler A function to execute each time the event is triggered.
2116 */
2117 keypress(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
2118
2119 /**
2120 * Trigger the "keyup" event on an element.
2121 */
2122 keyup(): JQuery;
2123 /**
2124 * Bind an event handler to the "keyup" JavaScript event
2125 *
2126 * @param handler A function to execute each time the event is triggered.
2127 */
2128 keyup(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
2129 /**
2130 * Bind an event handler to the "keyup" JavaScript event
2131 *
2132 * @param eventData An object containing data that will be passed to the event handler.
2133 * @param handler A function to execute each time the event is triggered.
2134 */
2135 keyup(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
2136
2137 /**
2138 * Bind an event handler to the "load" JavaScript event.
2139 *
2140 * @param handler A function to execute when the event is triggered.
2141 */
2142 load(handler: (eventObject: JQueryEventObject) => any): JQuery;
2143 /**
2144 * Bind an event handler to the "load" JavaScript event.
2145 *
2146 * @param eventData An object containing data that will be passed to the event handler.
2147 * @param handler A function to execute when the event is triggered.
2148 */
2149 load(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2150
2151 /**
2152 * Trigger the "mousedown" event on an element.
2153 */
2154 mousedown(): JQuery;
2155 /**
2156 * Bind an event handler to the "mousedown" JavaScript event.
2157 *
2158 * @param handler A function to execute when the event is triggered.
2159 */
2160 mousedown(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2161 /**
2162 * Bind an event handler to the "mousedown" JavaScript event.
2163 *
2164 * @param eventData An object containing data that will be passed to the event handler.
2165 * @param handler A function to execute when the event is triggered.
2166 */
2167 mousedown(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2168
2169 /**
2170 * Trigger the "mouseenter" event on an element.
2171 */
2172 mouseenter(): JQuery;
2173 /**
2174 * Bind an event handler to be fired when the mouse enters an element.
2175 *
2176 * @param handler A function to execute when the event is triggered.
2177 */
2178 mouseenter(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2179 /**
2180 * Bind an event handler to be fired when the mouse enters an element.
2181 *
2182 * @param eventData An object containing data that will be passed to the event handler.
2183 * @param handler A function to execute when the event is triggered.
2184 */
2185 mouseenter(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2186
2187 /**
2188 * Trigger the "mouseleave" event on an element.
2189 */
2190 mouseleave(): JQuery;
2191 /**
2192 * Bind an event handler to be fired when the mouse leaves an element.
2193 *
2194 * @param handler A function to execute when the event is triggered.
2195 */
2196 mouseleave(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2197 /**
2198 * Bind an event handler to be fired when the mouse leaves an element.
2199 *
2200 * @param eventData An object containing data that will be passed to the event handler.
2201 * @param handler A function to execute when the event is triggered.
2202 */
2203 mouseleave(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2204
2205 /**
2206 * Trigger the "mousemove" event on an element.
2207 */
2208 mousemove(): JQuery;
2209 /**
2210 * Bind an event handler to the "mousemove" JavaScript event.
2211 *
2212 * @param handler A function to execute when the event is triggered.
2213 */
2214 mousemove(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2215 /**
2216 * Bind an event handler to the "mousemove" JavaScript event.
2217 *
2218 * @param eventData An object containing data that will be passed to the event handler.
2219 * @param handler A function to execute when the event is triggered.
2220 */
2221 mousemove(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2222
2223 /**
2224 * Trigger the "mouseout" event on an element.
2225 */
2226 mouseout(): JQuery;
2227 /**
2228 * Bind an event handler to the "mouseout" JavaScript event.
2229 *
2230 * @param handler A function to execute when the event is triggered.
2231 */
2232 mouseout(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2233 /**
2234 * Bind an event handler to the "mouseout" JavaScript event.
2235 *
2236 * @param eventData An object containing data that will be passed to the event handler.
2237 * @param handler A function to execute when the event is triggered.
2238 */
2239 mouseout(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2240
2241 /**
2242 * Trigger the "mouseover" event on an element.
2243 */
2244 mouseover(): JQuery;
2245 /**
2246 * Bind an event handler to the "mouseover" JavaScript event.
2247 *
2248 * @param handler A function to execute when the event is triggered.
2249 */
2250 mouseover(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2251 /**
2252 * Bind an event handler to the "mouseover" JavaScript event.
2253 *
2254 * @param eventData An object containing data that will be passed to the event handler.
2255 * @param handler A function to execute when the event is triggered.
2256 */
2257 mouseover(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2258
2259 /**
2260 * Trigger the "mouseup" event on an element.
2261 */
2262 mouseup(): JQuery;
2263 /**
2264 * Bind an event handler to the "mouseup" JavaScript event.
2265 *
2266 * @param handler A function to execute when the event is triggered.
2267 */
2268 mouseup(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2269 /**
2270 * Bind an event handler to the "mouseup" JavaScript event.
2271 *
2272 * @param eventData An object containing data that will be passed to the event handler.
2273 * @param handler A function to execute when the event is triggered.
2274 */
2275 mouseup(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
2276
2277 /**
2278 * Remove an event handler.
2279 */
2280 off(): JQuery;
2281 /**
2282 * Remove an event handler.
2283 *
2284 * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
2285 * @param selector A selector which should match the one originally passed to .on() when attaching event handlers.
2286 * @param handler A handler function previously attached for the event(s), or the special value false.
2287 */
2288 off(events: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2289 /**
2290 * Remove an event handler.
2291 *
2292 * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
2293 * @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().
2294 */
2295 off(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
2296 /**
2297 * Remove an event handler.
2298 *
2299 * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
2300 * @param handler A handler function previously attached for the event(s), or the special value false.
2301 */
2302 off(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
2303 /**
2304 * Remove an event handler.
2305 *
2306 * @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).
2307 * @param selector A selector which should match the one originally passed to .on() when attaching event handlers.
2308 */
2309 off(events: { [key: string]: any; }, selector?: string): JQuery;
2310
2311 /**
2312 * Attach an event handler function for one or more events to the selected elements.
2313 *
2314 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2315 * @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).
2316 */
2317 on(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
2318 /**
2319 * Attach an event handler function for one or more events to the selected elements.
2320 *
2321 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2322 * @param data Data to be passed to the handler in event.data when an event is triggered.
2323 * @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.
2324 */
2325 on(events: string, data : any, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
2326 /**
2327 * Attach an event handler function for one or more events to the selected elements.
2328 *
2329 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2330 * @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.
2331 * @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.
2332 */
2333 on(events: string, selector: string, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery;
2334 /**
2335 * Attach an event handler function for one or more events to the selected elements.
2336 *
2337 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2338 * @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.
2339 * @param data Data to be passed to the handler in event.data when an event is triggered.
2340 * @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.
2341 */
2342 on(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery;
2343 /**
2344 * Attach an event handler function for one or more events to the selected elements.
2345 *
2346 * @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).
2347 * @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.
2348 * @param data Data to be passed to the handler in event.data when an event occurs.
2349 */
2350 on(events: { [key: string]: any; }, selector?: string, data?: any): JQuery;
2351 /**
2352 * Attach an event handler function for one or more events to the selected elements.
2353 *
2354 * @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).
2355 * @param data Data to be passed to the handler in event.data when an event occurs.
2356 */
2357 on(events: { [key: string]: any; }, data?: any): JQuery;
2358
2359 /**
2360 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2361 *
2362 * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
2363 * @param handler A function to execute at the time the event is triggered.
2364 */
2365 one(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
2366 /**
2367 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2368 *
2369 * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
2370 * @param data An object containing data that will be passed to the event handler.
2371 * @param handler A function to execute at the time the event is triggered.
2372 */
2373 one(events: string, data: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2374
2375 /**
2376 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2377 *
2378 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2379 * @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.
2380 * @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.
2381 */
2382 one(events: string, selector: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
2383 /**
2384 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2385 *
2386 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
2387 * @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.
2388 * @param data Data to be passed to the handler in event.data when an event is triggered.
2389 * @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.
2390 */
2391 one(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
2392
2393 /**
2394 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2395 *
2396 * @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).
2397 * @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.
2398 * @param data Data to be passed to the handler in event.data when an event occurs.
2399 */
2400 one(events: { [key: string]: any; }, selector?: string, data?: any): JQuery;
2401
2402 /**
2403 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
2404 *
2405 * @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).
2406 * @param data Data to be passed to the handler in event.data when an event occurs.
2407 */
2408 one(events: { [key: string]: any; }, data?: any): JQuery;
2409
2410
2411 /**
2412 * Specify a function to execute when the DOM is fully loaded.
2413 *
2414 * @param handler A function to execute after the DOM is ready.
2415 */
2416 ready(handler: (jQueryAlias?: JQueryStatic) => any): JQuery;
2417
2418 /**
2419 * Trigger the "resize" event on an element.
2420 */
2421 resize(): JQuery;
2422 /**
2423 * Bind an event handler to the "resize" JavaScript event.
2424 *
2425 * @param handler A function to execute each time the event is triggered.
2426 */
2427 resize(handler: (eventObject: JQueryEventObject) => any): JQuery;
2428 /**
2429 * Bind an event handler to the "resize" JavaScript event.
2430 *
2431 * @param eventData An object containing data that will be passed to the event handler.
2432 * @param handler A function to execute each time the event is triggered.
2433 */
2434 resize(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2435
2436 /**
2437 * Trigger the "scroll" event on an element.
2438 */
2439 scroll(): JQuery;
2440 /**
2441 * Bind an event handler to the "scroll" JavaScript event.
2442 *
2443 * @param handler A function to execute each time the event is triggered.
2444 */
2445 scroll(handler: (eventObject: JQueryEventObject) => any): JQuery;
2446 /**
2447 * Bind an event handler to the "scroll" JavaScript event.
2448 *
2449 * @param eventData An object containing data that will be passed to the event handler.
2450 * @param handler A function to execute each time the event is triggered.
2451 */
2452 scroll(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2453
2454 /**
2455 * Trigger the "select" event on an element.
2456 */
2457 select(): JQuery;
2458 /**
2459 * Bind an event handler to the "select" JavaScript event.
2460 *
2461 * @param handler A function to execute each time the event is triggered.
2462 */
2463 select(handler: (eventObject: JQueryEventObject) => any): JQuery;
2464 /**
2465 * Bind an event handler to the "select" JavaScript event.
2466 *
2467 * @param eventData An object containing data that will be passed to the event handler.
2468 * @param handler A function to execute each time the event is triggered.
2469 */
2470 select(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
2471
2472 /**
2473 * Trigger the "submit" event on an element.
2474 */
2475 submit(): JQuery;
2476 /**
2477 * Bind an event handler to the "submit" JavaScript event
2478 *
2479 * @param handler A function to execute each time the event is triggered.
2480 */
2481 submit(handler: (eventObject: JQueryEventObject) => any): JQuery;
2482 /**
2483 * Bind an event handler to the "submit" JavaScript event
2484 *
2485 * @param eventData An object containing data that will be passed to the event handler.
2486 * @param handler A function to execute each time the event is triggered.
2487 */
2488 submit(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2489
2490 /**
2491 * Execute all handlers and behaviors attached to the matched elements for the given event type.
2492 *
2493 * @param eventType A string containing a JavaScript event type, such as click or submit.
2494 * @param extraParameters Additional parameters to pass along to the event handler.
2495 */
2496 trigger(eventType: string, extraParameters?: any[]|Object): JQuery;
2497 /**
2498 * Execute all handlers and behaviors attached to the matched elements for the given event type.
2499 *
2500 * @param event A jQuery.Event object.
2501 * @param extraParameters Additional parameters to pass along to the event handler.
2502 */
2503 trigger(event: JQueryEventObject, extraParameters?: any[]|Object): JQuery;
2504
2505 /**
2506 * Execute all handlers attached to an element for an event.
2507 *
2508 * @param eventType A string containing a JavaScript event type, such as click or submit.
2509 * @param extraParameters An array of additional parameters to pass along to the event handler.
2510 */
2511 triggerHandler(eventType: string, ...extraParameters: any[]): Object;
2512
2513 /**
2514 * Execute all handlers attached to an element for an event.
2515 *
2516 * @param event A jQuery.Event object.
2517 * @param extraParameters An array of additional parameters to pass along to the event handler.
2518 */
2519 triggerHandler(event: JQueryEventObject, ...extraParameters: any[]): Object;
2520
2521 /**
2522 * Remove a previously-attached event handler from the elements.
2523 *
2524 * @param eventType A string containing a JavaScript event type, such as click or submit.
2525 * @param handler The function that is to be no longer executed.
2526 */
2527 unbind(eventType?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2528 /**
2529 * Remove a previously-attached event handler from the elements.
2530 *
2531 * @param eventType A string containing a JavaScript event type, such as click or submit.
2532 * @param fls Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ).
2533 */
2534 unbind(eventType: string, fls: boolean): JQuery;
2535 /**
2536 * Remove a previously-attached event handler from the elements.
2537 *
2538 * @param evt A JavaScript event object as passed to an event handler.
2539 */
2540 unbind(evt: any): JQuery;
2541
2542 /**
2543 * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
2544 */
2545 undelegate(): JQuery;
2546 /**
2547 * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
2548 *
2549 * @param selector A selector which will be used to filter the event results.
2550 * @param eventType A string containing a JavaScript event type, such as "click" or "keydown"
2551 * @param handler A function to execute at the time the event is triggered.
2552 */
2553 undelegate(selector: string, eventType: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2554 /**
2555 * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
2556 *
2557 * @param selector A selector which will be used to filter the event results.
2558 * @param events An object of one or more event types and previously bound functions to unbind from them.
2559 */
2560 undelegate(selector: string, events: Object): JQuery;
2561 /**
2562 * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
2563 *
2564 * @param namespace A string containing a namespace to unbind all events from.
2565 */
2566 undelegate(namespace: string): JQuery;
2567
2568 /**
2569 * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8)
2570 *
2571 * @param handler A function to execute when the event is triggered.
2572 */
2573 unload(handler: (eventObject: JQueryEventObject) => any): JQuery;
2574 /**
2575 * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8)
2576 *
2577 * @param eventData A plain object of data that will be passed to the event handler.
2578 * @param handler A function to execute when the event is triggered.
2579 */
2580 unload(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
2581
2582 /**
2583 * The DOM node context originally passed to jQuery(); if none was passed then context will likely be the document. (DEPRECATED from v1.10)
2584 */
2585 context: Element;
2586
2587 jquery: string;
2588
2589 /**
2590 * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8)
2591 *
2592 * @param handler A function to execute when the event is triggered.
2593 */
2594 error(handler: (eventObject: JQueryEventObject) => any): JQuery;
2595 /**
2596 * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8)
2597 *
2598 * @param eventData A plain object of data that will be passed to the event handler.
2599 * @param handler A function to execute when the event is triggered.
2600 */
2601 error(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
2602
2603 /**
2604 * Add a collection of DOM elements onto the jQuery stack.
2605 *
2606 * @param elements An array of elements to push onto the stack and make into a new jQuery object.
2607 */
2608 pushStack(elements: any[]): JQuery;
2609 /**
2610 * Add a collection of DOM elements onto the jQuery stack.
2611 *
2612 * @param elements An array of elements to push onto the stack and make into a new jQuery object.
2613 * @param name The name of a jQuery method that generated the array of elements.
2614 * @param arguments The arguments that were passed in to the jQuery method (for serialization).
2615 */
2616 pushStack(elements: any[], name: string, arguments: any[]): JQuery;
2617
2618 /**
2619 * Insert content, specified by the parameter, after each element in the set of matched elements.
2620 *
2621 * param content1 HTML string, DOM element, DocumentFragment, array of elements, or jQuery object to insert after each element in the set of matched elements.
2622 * 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.
2623 */
2624 after(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery;
2625 /**
2626 * Insert content, specified by the parameter, after each element in the set of matched elements.
2627 *
2628 * 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.
2629 */
2630 after(func: (index: number, html: string) => string|Element|JQuery): JQuery;
2631
2632 /**
2633 * Insert content, specified by the parameter, to the end of each element in the set of matched elements.
2634 *
2635 * 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.
2636 * 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.
2637 */
2638 append(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery;
2639 /**
2640 * Insert content, specified by the parameter, to the end of each element in the set of matched elements.
2641 *
2642 * 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.
2643 */
2644 append(func: (index: number, html: string) => string|Element|JQuery): JQuery;
2645
2646 /**
2647 * Insert every element in the set of matched elements to the end of the target.
2648 *
2649 * @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.
2650 */
2651 appendTo(target: JQuery|any[]|Element|string): JQuery;
2652
2653 /**
2654 * Insert content, specified by the parameter, before each element in the set of matched elements.
2655 *
2656 * param content1 HTML string, DOM element, DocumentFragment, array of elements, or jQuery object to insert before each element in the set of matched elements.
2657 * 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.
2658 */
2659 before(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery;
2660 /**
2661 * Insert content, specified by the parameter, before each element in the set of matched elements.
2662 *
2663 * 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.
2664 */
2665 before(func: (index: number, html: string) => string|Element|JQuery): JQuery;
2666
2667 /**
2668 * Create a deep copy of the set of matched elements.
2669 *
2670 * param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false.
2671 * 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).
2672 */
2673 clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): JQuery;
2674
2675 /**
2676 * Remove the set of matched elements from the DOM.
2677 *
2678 * param selector A selector expression that filters the set of matched elements to be removed.
2679 */
2680 detach(selector?: string): JQuery;
2681
2682 /**
2683 * Remove all child nodes of the set of matched elements from the DOM.
2684 */
2685 empty(): JQuery;
2686
2687 /**
2688 * Insert every element in the set of matched elements after the target.
2689 *
2690 * 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.
2691 */
2692 insertAfter(target: JQuery|any[]|Element|Text|string): JQuery;
2693
2694 /**
2695 * Insert every element in the set of matched elements before the target.
2696 *
2697 * 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.
2698 */
2699 insertBefore(target: JQuery|any[]|Element|Text|string): JQuery;
2700
2701 /**
2702 * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
2703 *
2704 * 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.
2705 * 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.
2706 */
2707 prepend(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery;
2708 /**
2709 * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
2710 *
2711 * 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.
2712 */
2713 prepend(func: (index: number, html: string) => string|Element|JQuery): JQuery;
2714
2715 /**
2716 * Insert every element in the set of matched elements to the beginning of the target.
2717 *
2718 * @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.
2719 */
2720 prependTo(target: JQuery|any[]|Element|string): JQuery;
2721
2722 /**
2723 * Remove the set of matched elements from the DOM.
2724 *
2725 * @param selector A selector expression that filters the set of matched elements to be removed.
2726 */
2727 remove(selector?: string): JQuery;
2728
2729 /**
2730 * Replace each target element with the set of matched elements.
2731 *
2732 * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace.
2733 */
2734 replaceAll(target: JQuery|any[]|Element|string): JQuery;
2735
2736 /**
2737 * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
2738 *
2739 * param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object.
2740 */
2741 replaceWith(newContent: JQuery|any[]|Element|Text|string): JQuery;
2742 /**
2743 * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
2744 *
2745 * param func A function that returns content with which to replace the set of matched elements.
2746 */
2747 replaceWith(func: () => Element|JQuery): JQuery;
2748
2749 /**
2750 * Get the combined text contents of each element in the set of matched elements, including their descendants.
2751 */
2752 text(): string;
2753 /**
2754 * Set the content of each element in the set of matched elements to the specified text.
2755 *
2756 * @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.
2757 */
2758 text(text: string|number|boolean): JQuery;
2759 /**
2760 * Set the content of each element in the set of matched elements to the specified text.
2761 *
2762 * @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.
2763 */
2764 text(func: (index: number, text: string) => string): JQuery;
2765
2766 /**
2767 * Retrieve all the elements contained in the jQuery set, as an array.
2768 * @name toArray
2769 */
2770 toArray(): HTMLElement[];
2771
2772 /**
2773 * Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
2774 */
2775 unwrap(): JQuery;
2776
2777 /**
2778 * Wrap an HTML structure around each element in the set of matched elements.
2779 *
2780 * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
2781 */
2782 wrap(wrappingElement: JQuery|Element|string): JQuery;
2783 /**
2784 * Wrap an HTML structure around each element in the set of matched elements.
2785 *
2786 * @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.
2787 */
2788 wrap(func: (index: number) => string|JQuery): JQuery;
2789
2790 /**
2791 * Wrap an HTML structure around all elements in the set of matched elements.
2792 *
2793 * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
2794 */
2795 wrapAll(wrappingElement: JQuery|Element|string): JQuery;
2796 wrapAll(func: (index: number) => string): JQuery;
2797
2798 /**
2799 * Wrap an HTML structure around the content of each element in the set of matched elements.
2800 *
2801 * @param wrappingElement An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements.
2802 */
2803 wrapInner(wrappingElement: JQuery|Element|string): JQuery;
2804 /**
2805 * Wrap an HTML structure around the content of each element in the set of matched elements.
2806 *
2807 * @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.
2808 */
2809 wrapInner(func: (index: number) => string): JQuery;
2810
2811 /**
2812 * Iterate over a jQuery object, executing a function for each matched element.
2813 *
2814 * @param func A function to execute for each matched element.
2815 */
2816 each(func: (index: number, elem: Element) => any): JQuery;
2817
2818 /**
2819 * Retrieve one of the elements matched by the jQuery object.
2820 *
2821 * @param index A zero-based integer indicating which element to retrieve.
2822 */
2823 get(index: number): HTMLElement;
2824 /**
2825 * Retrieve the elements matched by the jQuery object.
2826 * @alias toArray
2827 */
2828 get(): HTMLElement[];
2829
2830 /**
2831 * Search for a given element from among the matched elements.
2832 */
2833 index(): number;
2834 /**
2835 * Search for a given element from among the matched elements.
2836 *
2837 * @param selector A selector representing a jQuery collection in which to look for an element.
2838 */
2839 index(selector: string|JQuery|Element): number;
2840
2841 /**
2842 * The number of elements in the jQuery object.
2843 */
2844 length: number;
2845 /**
2846 * A selector representing selector passed to jQuery(), if any, when creating the original set.
2847 * version deprecated: 1.7, removed: 1.9
2848 */
2849 selector: string;
2850 [index: string]: any;
2851 [index: number]: HTMLElement;
2852
2853 /**
2854 * Add elements to the set of matched elements.
2855 *
2856 * @param selector A string representing a selector expression to find additional elements to add to the set of matched elements.
2857 * @param context The point in the document at which the selector should begin matching; similar to the context argument of the $(selector, context) method.
2858 */
2859 add(selector: string, context?: Element): JQuery;
2860 /**
2861 * Add elements to the set of matched elements.
2862 *
2863 * @param elements One or more elements to add to the set of matched elements.
2864 */
2865 add(...elements: Element[]): JQuery;
2866 /**
2867 * Add elements to the set of matched elements.
2868 *
2869 * @param html An HTML fragment to add to the set of matched elements.
2870 */
2871 add(html: string): JQuery;
2872 /**
2873 * Add elements to the set of matched elements.
2874 *
2875 * @param obj An existing jQuery object to add to the set of matched elements.
2876 */
2877 add(obj: JQuery): JQuery;
2878
2879 /**
2880 * Get the children of each element in the set of matched elements, optionally filtered by a selector.
2881 *
2882 * @param selector A string containing a selector expression to match elements against.
2883 */
2884 children(selector?: string): JQuery;
2885
2886 /**
2887 * 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.
2888 *
2889 * @param selector A string containing a selector expression to match elements against.
2890 */
2891 closest(selector: string): JQuery;
2892 /**
2893 * 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.
2894 *
2895 * @param selector A string containing a selector expression to match elements against.
2896 * @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.
2897 */
2898 closest(selector: string, context?: Element): JQuery;
2899 /**
2900 * 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.
2901 *
2902 * @param obj A jQuery object to match elements against.
2903 */
2904 closest(obj: JQuery): JQuery;
2905 /**
2906 * 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.
2907 *
2908 * @param element An element to match elements against.
2909 */
2910 closest(element: Element): JQuery;
2911
2912 /**
2913 * Get an array of all the elements and selectors matched against the current element up through the DOM tree.
2914 *
2915 * @param selectors An array or string containing a selector expression to match elements against (can also be a jQuery object).
2916 * @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.
2917 */
2918 closest(selectors: any, context?: Element): any[];
2919
2920 /**
2921 * Get the children of each element in the set of matched elements, including text and comment nodes.
2922 */
2923 contents(): JQuery;
2924
2925 /**
2926 * End the most recent filtering operation in the current chain and return the set of matched elements to its previous state.
2927 */
2928 end(): JQuery;
2929
2930 /**
2931 * Reduce the set of matched elements to the one at the specified index.
2932 *
2933 * @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.
2934 *
2935 */
2936 eq(index: number): JQuery;
2937
2938 /**
2939 * Reduce the set of matched elements to those that match the selector or pass the function's test.
2940 *
2941 * @param selector A string containing a selector expression to match the current set of elements against.
2942 */
2943 filter(selector: string): JQuery;
2944 /**
2945 * Reduce the set of matched elements to those that match the selector or pass the function's test.
2946 *
2947 * @param func A function used as a test for each element in the set. this is the current DOM element.
2948 */
2949 filter(func: (index: number, element: Element) => any): JQuery;
2950 /**
2951 * Reduce the set of matched elements to those that match the selector or pass the function's test.
2952 *
2953 * @param element An element to match the current set of elements against.
2954 */
2955 filter(element: Element): JQuery;
2956 /**
2957 * Reduce the set of matched elements to those that match the selector or pass the function's test.
2958 *
2959 * @param obj An existing jQuery object to match the current set of elements against.
2960 */
2961 filter(obj: JQuery): JQuery;
2962
2963 /**
2964 * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
2965 *
2966 * @param selector A string containing a selector expression to match elements against.
2967 */
2968 find(selector: string): JQuery;
2969 /**
2970 * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
2971 *
2972 * @param element An element to match elements against.
2973 */
2974 find(element: Element): JQuery;
2975 /**
2976 * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
2977 *
2978 * @param obj A jQuery object to match elements against.
2979 */
2980 find(obj: JQuery): JQuery;
2981
2982 /**
2983 * Reduce the set of matched elements to the first in the set.
2984 */
2985 first(): JQuery;
2986
2987 /**
2988 * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
2989 *
2990 * @param selector A string containing a selector expression to match elements against.
2991 */
2992 has(selector: string): JQuery;
2993 /**
2994 * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
2995 *
2996 * @param contained A DOM element to match elements against.
2997 */
2998 has(contained: Element): JQuery;
2999
3000 /**
3001 * 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.
3002 *
3003 * @param selector A string containing a selector expression to match elements against.
3004 */
3005 is(selector: string): boolean;
3006 /**
3007 * 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.
3008 *
3009 * @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.
3010 */
3011 is(func: (index: number, element: Element) => boolean): boolean;
3012 /**
3013 * 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.
3014 *
3015 * @param obj An existing jQuery object to match the current set of elements against.
3016 */
3017 is(obj: JQuery): boolean;
3018 /**
3019 * 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.
3020 *
3021 * @param elements One or more elements to match the current set of elements against.
3022 */
3023 is(elements: any): boolean;
3024
3025 /**
3026 * Reduce the set of matched elements to the final one in the set.
3027 */
3028 last(): JQuery;
3029
3030 /**
3031 * Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.
3032 *
3033 * @param callback A function object that will be invoked for each element in the current set.
3034 */
3035 map(callback: (index: number, domElement: Element) => any): JQuery;
3036
3037 /**
3038 * 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.
3039 *
3040 * @param selector A string containing a selector expression to match elements against.
3041 */
3042 next(selector?: string): JQuery;
3043
3044 /**
3045 * Get all following siblings of each element in the set of matched elements, optionally filtered by a selector.
3046 *
3047 * @param selector A string containing a selector expression to match elements against.
3048 */
3049 nextAll(selector?: string): JQuery;
3050
3051 /**
3052 * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
3053 *
3054 * @param selector A string containing a selector expression to indicate where to stop matching following sibling elements.
3055 * @param filter A string containing a selector expression to match elements against.
3056 */
3057 nextUntil(selector?: string, filter?: string): JQuery;
3058 /**
3059 * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
3060 *
3061 * @param element A DOM node or jQuery object indicating where to stop matching following sibling elements.
3062 * @param filter A string containing a selector expression to match elements against.
3063 */
3064 nextUntil(element?: Element, filter?: string): JQuery;
3065 /**
3066 * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
3067 *
3068 * @param obj A DOM node or jQuery object indicating where to stop matching following sibling elements.
3069 * @param filter A string containing a selector expression to match elements against.
3070 */
3071 nextUntil(obj?: JQuery, filter?: string): JQuery;
3072
3073 /**
3074 * Remove elements from the set of matched elements.
3075 *
3076 * @param selector A string containing a selector expression to match elements against.
3077 */
3078 not(selector: string): JQuery;
3079 /**
3080 * Remove elements from the set of matched elements.
3081 *
3082 * @param func A function used as a test for each element in the set. this is the current DOM element.
3083 */
3084 not(func: (index: number, element: Element) => boolean): JQuery;
3085 /**
3086 * Remove elements from the set of matched elements.
3087 *
3088 * @param elements One or more DOM elements to remove from the matched set.
3089 */
3090 not(elements: Element|Element[]): JQuery;
3091 /**
3092 * Remove elements from the set of matched elements.
3093 *
3094 * @param obj An existing jQuery object to match the current set of elements against.
3095 */
3096 not(obj: JQuery): JQuery;
3097
3098 /**
3099 * Get the closest ancestor element that is positioned.
3100 */
3101 offsetParent(): JQuery;
3102
3103 /**
3104 * Get the parent of each element in the current set of matched elements, optionally filtered by a selector.
3105 *
3106 * @param selector A string containing a selector expression to match elements against.
3107 */
3108 parent(selector?: string): JQuery;
3109
3110 /**
3111 * Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector.
3112 *
3113 * @param selector A string containing a selector expression to match elements against.
3114 */
3115 parents(selector?: string): JQuery;
3116
3117 /**
3118 * 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.
3119 *
3120 * @param selector A string containing a selector expression to indicate where to stop matching ancestor elements.
3121 * @param filter A string containing a selector expression to match elements against.
3122 */
3123 parentsUntil(selector?: string, filter?: string): JQuery;
3124 /**
3125 * 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.
3126 *
3127 * @param element A DOM node or jQuery object indicating where to stop matching ancestor elements.
3128 * @param filter A string containing a selector expression to match elements against.
3129 */
3130 parentsUntil(element?: Element, filter?: string): JQuery;
3131 /**
3132 * 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.
3133 *
3134 * @param obj A DOM node or jQuery object indicating where to stop matching ancestor elements.
3135 * @param filter A string containing a selector expression to match elements against.
3136 */
3137 parentsUntil(obj?: JQuery, filter?: string): JQuery;
3138
3139 /**
3140 * Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector.
3141 *
3142 * @param selector A string containing a selector expression to match elements against.
3143 */
3144 prev(selector?: string): JQuery;
3145
3146 /**
3147 * Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector.
3148 *
3149 * @param selector A string containing a selector expression to match elements against.
3150 */
3151 prevAll(selector?: string): JQuery;
3152
3153 /**
3154 * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
3155 *
3156 * @param selector A string containing a selector expression to indicate where to stop matching preceding sibling elements.
3157 * @param filter A string containing a selector expression to match elements against.
3158 */
3159 prevUntil(selector?: string, filter?: string): JQuery;
3160 /**
3161 * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
3162 *
3163 * @param element A DOM node or jQuery object indicating where to stop matching preceding sibling elements.
3164 * @param filter A string containing a selector expression to match elements against.
3165 */
3166 prevUntil(element?: Element, filter?: string): JQuery;
3167 /**
3168 * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
3169 *
3170 * @param obj A DOM node or jQuery object indicating where to stop matching preceding sibling elements.
3171 * @param filter A string containing a selector expression to match elements against.
3172 */
3173 prevUntil(obj?: JQuery, filter?: string): JQuery;
3174
3175 /**
3176 * Get the siblings of each element in the set of matched elements, optionally filtered by a selector.
3177 *
3178 * @param selector A string containing a selector expression to match elements against.
3179 */
3180 siblings(selector?: string): JQuery;
3181
3182 /**
3183 * Reduce the set of matched elements to a subset specified by a range of indices.
3184 *
3185 * @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.
3186 * @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.
3187 */
3188 slice(start: number, end?: number): JQuery;
3189
3190 /**
3191 * Show the queue of functions to be executed on the matched elements.
3192 *
3193 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
3194 */
3195 queue(queueName?: string): any[];
3196 /**
3197 * Manipulate the queue of functions to be executed, once for each matched element.
3198 *
3199 * @param newQueue An array of functions to replace the current queue contents.
3200 */
3201 queue(newQueue: Function[]): JQuery;
3202 /**
3203 * Manipulate the queue of functions to be executed, once for each matched element.
3204 *
3205 * @param callback The new function to add to the queue, with a function to call that will dequeue the next item.
3206 */
3207 queue(callback: Function): JQuery;
3208 /**
3209 * Manipulate the queue of functions to be executed, once for each matched element.
3210 *
3211 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
3212 * @param newQueue An array of functions to replace the current queue contents.
3213 */
3214 queue(queueName: string, newQueue: Function[]): JQuery;
3215 /**
3216 * Manipulate the queue of functions to be executed, once for each matched element.
3217 *
3218 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
3219 * @param callback The new function to add to the queue, with a function to call that will dequeue the next item.
3220 */
3221 queue(queueName: string, callback: Function): JQuery;
3222}
3223declare module "jquery" {
3224 export = $;
3225}
3226declare var jQuery: JQueryStatic;
3227declare var $: JQueryStatic;