// tslint:disable:jsdoc-format // tslint:disable:max-line-length // tslint:disable:no-irregular-whitespace interface JQuery extends Iterable { /** * A string containing the jQuery version number. * @see \`{@link https://api.jquery.com/jquery-2/#jquery1 }\` * @since 1.0 * @example ​ ````Determine if an object is a jQuery object ```javascript var a = { what: "A regular JS object" }, b = $( "body" ); ​ if ( a.jquery ) { // Falsy, since it's undefined alert( "a is a jQuery object!" ); } ​ if ( b.jquery ) { // Truthy, since it's a string alert( "b is a jQuery object!" ); } ``` * @example ​ ````Get the current version of jQuery running on the page ```javascript alert( "You are running jQuery version: " + $.fn.jquery ); ``` */ jquery: string; /** * The number of elements in the jQuery object. * @see \`{@link https://api.jquery.com/length/ }\` * @since 1.0 * @example ​ ````Count the divs. Click to add more. ```html length demo
​ ``` */ length: number; /** * Create a new jQuery object with elements added to the set of matched elements. * @param selector A string representing a selector expression to find additional elements to add to the set of matched elements. * @param context The point in the document at which the selector should begin matching; similar to the context * argument of the $(selector, context) method. * @see \`{@link https://api.jquery.com/add/ }\` * @since 1.4 */ add(selector: JQuery.Selector, context: Element): this; // TODO: The return type should reflect newly selected types. /** * Create a new jQuery object with elements added to the set of matched elements. * @param selector_elements_html_selection _@param_ `selector_elements_html_selection` *
* * `selector` — A string representing a selector expression to find additional elements to add to the set of matched elements.
* * `elements` — One or more elements to add to the set of matched elements.
* * `html` — An HTML fragment to add to the set of matched elements.
* * `selection` — An existing jQuery object to add to the set of matched elements. * @see \`{@link https://api.jquery.com/add/ }\` * @since 1.0 * @since 1.3.2 * @example ​ ````Finds all divs and makes a border. Then adds all paragraphs to the jQuery object to set their backgrounds yellow. ```html add demo

Added this... (notice no border)

​ ``` * @example ​ ````Adds more elements, matched by the given expression, to the set of matched elements. ```html add demo

Hello

Hello Again ​ ``` * @example ​ ````Adds more elements, created on the fly, to the set of matched elements. ```html add demo

Hello

​ ``` * @example ​ ````Adds one or more Elements to the set of matched elements. ```html add demo

Hello

Hello Again ​ ``` * @example ​ ````Demonstrates how to add (or push) elements to an existing collection ```html add demo

Hello

Hello Again ​ ``` */ add(selector_elements_html_selection: JQuery.Selector | JQuery.TypeOrArray | JQuery.htmlString | JQuery | JQuery.Node): this; /** * Add the previous set of elements on the stack to the current set, optionally filtered by a selector. * @param selector A string containing a selector expression to match the current set of elements against. * @see \`{@link https://api.jquery.com/addBack/ }\` * @since 1.8 * @example ​ ````The .addBack() method causes the previous set of DOM elements in the traversal stack to be added to the current set. In the first example, the top stack contains the set resulting from .find("p"). In the second example, .addBack() adds the previous set of elements on the stack — in this case $("div.after-addback") — to the current set, selecting both the div and its enclosed paragraphs. ```html addBack demo

Before addBack()

First Paragraph

Second Paragraph

After addBack()

First Paragraph

Second Paragraph

​ ``` */ addBack(selector?: JQuery.Selector): this; /** * Adds the specified class(es) to each element in the set of matched elements. * @param className_function _@param_ `className_function` *
* * `className` — One or more space-separated classes to be added to the class attribute of each matched element.
* * `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. * @see \`{@link https://api.jquery.com/addClass/ }\` * @since 1.0 * @since 1.4 * @since 3.3 * @example ​ ````Add the class "selected" to the matched elements. ```html addClass demo

Hello

and

Goodbye

​ ``` * @example ​ ````Add the classes "selected" and "highlight" to the matched elements. ```html addClass demo

Hello

and

Goodbye

​ ``` * @example ​ ````Pass in a function to .addClass() to add the "green" class to a div that already has a "red" class. ```html addClass demo
This div should be white
This div will be green because it now has the "green" and "red" classes. It would be red if the addClass function failed.
This div should be white

There are zero green divs

​ ``` */ addClass(className_function: JQuery.TypeOrArray | ((this: TElement, index: number, currentClassName: string) => string)): this; /** * Insert content, specified by the parameter, after each element in the set of matched elements. * @param contents One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or * jQuery objects to insert after each element in the set of matched elements. * @see \`{@link https://api.jquery.com/after/ }\` * @since 1.0 * @example ​ ````Inserts some HTML after all paragraphs. ```html after demo

I would like to say:

​ ``` * @example ​ ````Inserts a DOM element after all paragraphs. ```html after demo

I would like to say:

​ ``` * @example ​ ````Inserts a jQuery object (similar to an Array of DOM Elements) after all paragraphs. ```html after demo Hello

I would like to say:

​ ``` */ after(...contents: Array>>): this; /** * Insert content, specified by the parameter, after each element in the set of matched elements. * @param function_functionーhtml _@param_ `function_functionーhtml` *
* * `function` — A function that returns an HTML string, DOM element(s), text node(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.
* * `functionーhtml` — A function that returns an HTML string, DOM element(s), text node(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 and the old HTML value of the element as arguments. Within the function, `this` refers to the * current element in the set. * @see \`{@link https://api.jquery.com/after/ }\` * @since 1.4 * @since 1.10 */ after(function_functionーhtml: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray>): this; /** * Register a handler to be called when Ajax requests complete. This is an AjaxEvent. * @param handler The function to be invoked. * @see \`{@link https://api.jquery.com/ajaxComplete/ }\` * @since 1.0 * @example ​ ````Show a message when an Ajax request completes. ```javascript $( document ).ajaxComplete(function( event, request, settings ) { $( "#msg" ).append( "
  • Request Complete.
  • " ); }); ``` */ ajaxComplete(handler: (this: Document, event: JQuery.TriggeredEvent, jqXHR: JQuery.jqXHR, ajaxOptions: JQuery.AjaxSettings) => void | false): this; /** * Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event. * @param handler The function to be invoked. * @see \`{@link https://api.jquery.com/ajaxError/ }\` * @since 1.0 * @example ​ ````Show a message when an Ajax request fails. ```javascript $( document ).ajaxError(function( event, request, settings ) { $( "#msg" ).append( "
  • Error requesting page " + settings.url + "
  • " ); }); ``` */ ajaxError(handler: (this: Document, event: JQuery.TriggeredEvent, jqXHR: JQuery.jqXHR, ajaxSettings: JQuery.AjaxSettings, thrownError: string) => void | false): this; /** * Attach a function to be executed before an Ajax request is sent. This is an Ajax Event. * @param handler The function to be invoked. * @see \`{@link https://api.jquery.com/ajaxSend/ }\` * @since 1.0 * @example ​ ````Show a message before an Ajax request is sent. ```javascript $( document ).ajaxSend(function( event, request, settings ) { $( "#msg" ).append( "
  • Starting request at " + settings.url + "
  • " ); }); ``` */ ajaxSend(handler: (this: Document, event: JQuery.TriggeredEvent, jqXHR: JQuery.jqXHR, ajaxOptions: JQuery.AjaxSettings) => void | false): this; /** * Register a handler to be called when the first Ajax request begins. This is an Ajax Event. * @param handler The function to be invoked. * @see \`{@link https://api.jquery.com/ajaxStart/ }\` * @since 1.0 * @example ​ ````Show a loading message whenever an Ajax request starts (and none is already active). ```javascript $( document ).ajaxStart(function() { $( "#loading" ).show(); }); ``` */ ajaxStart(handler: (this: Document) => void | false): this; /** * Register a handler to be called when all Ajax requests have completed. This is an Ajax Event. * @param handler The function to be invoked. * @see \`{@link https://api.jquery.com/ajaxStop/ }\` * @since 1.0 * @example ​ ````Hide a loading message after all the Ajax requests have stopped. ```javascript $( document ).ajaxStop(function() { $( "#loading" ).hide(); }); ``` */ ajaxStop(handler: (this: Document) => void | false): this; /** * Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event. * @param handler The function to be invoked. * @see \`{@link https://api.jquery.com/ajaxSuccess/ }\` * @since 1.0 * @example ​ ````Show a message when an Ajax request completes successfully. ```javascript $( document ).ajaxSuccess(function( event, request, settings ) { $( "#msg" ).append( "
  • Successful Request!
  • " ); }); ``` */ ajaxSuccess(handler: (this: Document, event: JQuery.TriggeredEvent, jqXHR: JQuery.jqXHR, ajaxOptions: JQuery.AjaxSettings, data: JQuery.PlainObject) => void | false): this; /** * Perform a custom animation of a set of CSS properties. * @param properties An object of CSS properties and values that the animation will move toward. * @param duration A string or number determining how long the animation will run. * @param easing A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/animate/ }\` * @since 1.0 * @example ​ ````An example of using an 'easing' function to provide a different style of animation. This will only work if you have a plugin that provides this easing function. Note, this code will do nothing unless the paragraph element is hidden. ```javascript $( "p" ).animate({ opacity: "show" }, "slow", "easein" ); ``` * @example ​ ````Animate all paragraphs and execute a callback function when the animation is complete. The first argument is an object of CSS properties, the second specifies that the animation should take 1000 milliseconds to complete, the third states the easing type, and the fourth argument is an anonymous callback function. ```javascript $( "p" ).animate({ height: 200, width: 400, opacity: 0.5 }, 1000, "linear", function() { alert( "all done" ); }); ``` */ animate(properties: JQuery.PlainObject, duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; /** * Perform a custom animation of a set of CSS properties. * @param properties An object of CSS properties and values that the animation will move toward. * @param duration_easing _@param_ `duration_easing` *
    * * `duration` — A string or number determining how long the animation will run.
    * * `easing` — A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/animate/ }\` * @since 1.0 * @example ​ ````Click the button to animate the div with a number of different properties. ```html animate demo
    Hello!
    ​ ``` * @example ​ ````Animates a div's left property with a relative value. Click several times on the buttons to see the relative animations queued up. ```html animate demo
    ​ ``` * @example ​ ````Animate all paragraphs to toggle both height and opacity, completing the animation within 600 milliseconds. ```javascript $( "p" ).animate({ height: "toggle", opacity: "toggle" }, "slow" ); ``` * @example ​ ````Animate all paragraphs to a left style of 50 and opacity of 1 (opaque, visible), completing the animation within 500 milliseconds. ```javascript $( "p" ).animate({ left: 50, opacity: 1 }, 500 ); ``` */ animate(properties: JQuery.PlainObject, duration_easing: JQuery.Duration | string, complete?: (this: TElement) => void): this; /** * Perform a custom animation of a set of CSS properties. * @param properties An object of CSS properties and values that the animation will move toward. * @param options A map of additional options to pass to the method. * @see \`{@link https://api.jquery.com/animate/ }\` * @since 1.0 * @example ​ ````The first button shows how an unqueued animation works. It expands the div out to 90% width while the font-size is increasing. Once the font-size change is complete, the border animation will begin. The second button starts a traditional chained animation, where each animation will start once the previous animation on the element has completed. ```html animate demo
    Block1
    Block2
    ​ ``` * @example ​ ````Animates the first div's left property and synchronizes the remaining divs, using the step function to set their left properties at each stage of the animation. ```html animate demo

    ​ ``` * @example ​ ````Animate the left and opacity style properties of all paragraphs; run the animation outside the queue, so that it will automatically start without waiting for its turn. ```javascript $( "p" ).animate({ left: "50px", opacity: 1 }, { duration: 500, queue: false }); ``` * @example ​ ````Animates all paragraphs to toggle both height and opacity, completing the animation within 600 milliseconds. ```javascript $( "p" ).animate({ height: "toggle", opacity: "toggle" }, { duration: "slow" }); ``` * @example ​ ````Use an easing function to provide a different style of animation. This will only work if you have a plugin that provides this easing function. ```javascript $( "p" ).animate({ opacity: "show" }, { duration: "slow", easing: "easein" }); ``` */ animate(properties: JQuery.PlainObject, options: JQuery.EffectsOptions): this; /** * Perform a custom animation of a set of CSS properties. * @param properties An object of CSS properties and values that the animation will move toward. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/animate/ }\` * @since 1.0 */ animate(properties: JQuery.PlainObject, complete?: (this: TElement) => void): this; /** * Insert content, specified by the parameter, to the end of each element in the set of matched elements. * @param contents One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or * jQuery objects to insert at the end of each element in the set of matched elements. * @see \`{@link https://api.jquery.com/append/ }\` * @since 1.0 * @example ​ ````Appends some HTML to all paragraphs. ```html append demo

    I would like to say:

    ​ ``` * @example ​ ````Appends an Element to all paragraphs. ```html append demo

    I would like to say:

    ​ ``` * @example ​ ````Appends a jQuery object (similar to an Array of DOM Elements) to all paragraphs. ```html append demo Hello world!!!

    I would like to say:

    ​ ``` */ append(...contents: Array>>): this; /** * Insert content, specified by the parameter, to the end of each element in the set of matched elements. * @param funсtion A function that returns an HTML string, DOM element(s), text node(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. * @see \`{@link https://api.jquery.com/append/ }\` * @since 1.4 */ append(funсtion: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray>): this; /** * Insert every element in the set of matched elements to the end of the target. * @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. * @see \`{@link https://api.jquery.com/appendTo/ }\` * @since 1.0 * @example ​ ````Append all spans to the element with the ID "foo" (Check append() documentation for more examples) ```html appendTo demo I have nothing more to say...
    FOO!
    ​ ``` */ appendTo(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; /** * Set one or more attributes for the set of matched elements. * @param attributeName The name of the attribute to set. * @param value_function _@param_ `value_function` *
    * * `value` — A value to set for the attribute. If `null`, the specified attribute will be removed (as in \`{@link removeAttr .removeAttr()}`).
    * * `function` — 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. * @see \`{@link https://api.jquery.com/attr/ }\` * @since 1.0 * @since 1.1 * @example ​ ````Set the id for divs based on the position in the page. ```html attr demo
    Zero-th
    First
    Second
    ​ ``` * @example ​ ````Set the src attribute from title attribute on the image. ```html attr demo ​ ``` */ attr(attributeName: string, value_function: string | number | null | ((this: TElement, index: number, attr: string) => string | number | void | undefined)): this; /** * Set one or more attributes for the set of matched elements. * @param attributes An object of attribute-value pairs to set. * @see \`{@link https://api.jquery.com/attr/ }\` * @since 1.0 * @example ​ ````Set some attributes for all <img>s in the page. ```html attr demo
    Attribute of Ajax
    ​ ``` */ attr(attributes: JQuery.PlainObject): this; /** * Get the value of an attribute for the first element in the set of matched elements. * @param attributeName The name of the attribute to get. * @see \`{@link https://api.jquery.com/attr/ }\` * @since 1.0 * @example ​ ````Display the checked attribute and property of a checkbox as it changes. ```html attr demo

    ​ ``` * @example ​ ````Find the title attribute of the first <em> in the page. ```html attr demo

    Once there was a large dinosaur...

    ​ The title of the emphasis is:
    ​ ``` */ attr(attributeName: string): string | undefined; /** * Insert content, specified by the parameter, before each element in the set of matched elements. * @param contents One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or * jQuery objects to insert before each element in the set of matched elements. * @see \`{@link https://api.jquery.com/before/ }\` * @since 1.0 * @example ​ ````Inserts some HTML before all paragraphs. ```html before demo

    is what I said...

    ​ ``` * @example ​ ````Inserts a DOM element before all paragraphs. ```html before demo

    is what I said...

    ​ ``` * @example ​ ````Inserts a jQuery object (similar to an Array of DOM Elements) before all paragraphs. ```html before demo

    is what I said...

    Hello ​ ``` */ before(...contents: Array>>): this; /** * Insert content, specified by the parameter, before each element in the set of matched elements. * @param function_functionーhtml _@param_ `function_functionーhtml` *
    * * `function` — A function that returns an HTML string, DOM element(s), text node(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.
    * * `functionーhtml` — A function that returns an HTML string, DOM element(s), text node(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 and the old HTML value of the element as arguments. Within the function, `this` refers to the * current element in the set. * @see \`{@link https://api.jquery.com/before/ }\` * @since 1.4 * @since 1.10 */ before(function_functionーhtml: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray>): this; // [bind() overloads] https://github.com/jquery/api.jquery.com/issues/1048 /** * Attach a handler to an event for the elements. * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/bind/ }\` * @since 1.0 * @since 1.4.3 * @deprecated ​ Deprecated since 3.0. Use \`{@link on }\`. * * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. * * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. */ bind( eventType: TType, eventData: TData, handler: JQuery.TypeEventHandler ): this; /** * Attach a handler to an event for the elements. * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. * @param handler_preventBubble _@param_ `handler_preventBubble` *
    * * `handler` — A function to execute each time the event is triggered.
    * * `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`. * @see \`{@link https://api.jquery.com/bind/ }\` * @since 1.0 * @since 1.4.3 * @deprecated ​ Deprecated since 3.0. Use \`{@link on }\`. * * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. * * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. * @example ​ ````Handle click and double-click for the paragraph. Note: the coordinates are window relative, so in this case relative to the demo iframe. ```html bind demo

    Click or double click here.

    ​ ``` * @example ​ ````To display each paragraph's text in an alert box whenever it is clicked: ```javascript $( "p" ).bind( "click", function() { alert( $( this ).text() ); }); ``` * @example ​ ````Cancel a default action and prevent it from bubbling up by returning false: ```javascript $( "form" ).bind( "submit", function() { return false; }) ``` * @example ​ ````Cancel only the default action by using the .preventDefault() method. ```javascript $( "form" ).bind( "submit", function( event ) { event.preventDefault(); }); ``` * @example ​ ````Stop an event from bubbling without preventing the default action by using the .stopPropagation() method. ```javascript $( "form" ).bind( "submit", function( event ) { event.stopPropagation(); }); ``` * @example ​ ````Bind custom events. ```html bind demo

    Has an attached custom event.

    ​ ``` */ bind( eventType: TType, handler_preventBubble: JQuery.TypeEventHandler | false | null | undefined ): this; /** * Attach a handler to an event for the elements. * @param events An object containing one or more DOM event types and functions to execute for them. * @see \`{@link https://api.jquery.com/bind/ }\` * @since 1.4 * @deprecated ​ Deprecated since 3.0. Use \`{@link on }\`. * * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. * * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. * @example ​ ````Bind multiple events simultaneously. ```javascript $( "div.test" ).bind({ click: function() { $( this ).addClass( "active" ); }, mouseenter: function() { $( this ).addClass( "inside" ); }, mouseleave: function() { $( this ).removeClass( "inside" ); } }); ``` */ bind(events: JQuery.TypeEventHandlers): this; /** * Bind an event handler to the "blur" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/blur/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ blur(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "blur" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/blur/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````To trigger the blur event on all paragraphs: ```javascript $( "p" ).blur(); ``` */ blur(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "change" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/change/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ change(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "change" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/change/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````Attaches a change event to the select that gets the text for each selected option and writes them in the div. It then triggers the event for the initial text draw. ```html change demo
    ​ ``` * @example ​ ````To add a validity test to all text input elements: ```javascript $( "input[type='text']" ).change(function() { // Check input( $( this ).val() ) for validity here }); ``` */ change(handler?: JQuery.TypeEventHandler | false): this; /** * Get the children of each element in the set of matched elements, optionally filtered by a selector. * @param selector A string containing a selector expression to match elements against. * @see \`{@link https://api.jquery.com/children/ }\` * @since 1.0 * @example ​ ````Find all children of the clicked element. ```html children demo

    This is the way we write the demo,

    write the demo, demo,
    This the way we write the demo so in

    the morning. Found 0 children in TAG.

    ​ ``` * @example ​ ````Find all children of each div. ```html children demo

    Hello (this is a paragraph)

    Hello Again (this span is a child of the a div)

    And Again (in another paragraph)

    And One Last Time (most text directly in a div)
    ​ ``` * @example ​ ````Find all children with a class "selected" of each div. ```html children demo
    Hello

    Hello Again

    And Again

    And One Last Time

    ​ ``` */ children(selector?: JQuery.Selector): this; /** * Remove from the queue all items that have not yet been run. * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. * @see \`{@link https://api.jquery.com/clearQueue/ }\` * @since 1.4 * @example ​ ````Empty the queue. ```html clearQueue demo
    ​ ``` */ clearQueue(queueName?: string): this; /** * Bind an event handler to the "click" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/click/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ click(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "click" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/click/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````Hide paragraphs on a page when they are clicked: ```html click demo

    First Paragraph

    Second Paragraph

    Yet one more Paragraph

    ​ ``` * @example ​ ````Trigger the click event on all of the paragraphs on the page: ```javascript $( "p" ).click(); ``` */ click(handler?: JQuery.TypeEventHandler | false): this; /** * Create a deep copy of the set of matched elements. * @param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The * default value is false. *In jQuery 1.5.0 the default value was incorrectly true; it was changed back * to false in 1.5.1 and up. * @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). * @see \`{@link https://api.jquery.com/clone/ }\` * @since 1.0 * @since 1.5 * @example ​ ````Clones all b elements (and selects the clones) and prepends them to all paragraphs. ```html clone demo Hello

    , how are you?

    ​ ``` */ clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): this; /** * 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. * @param selector A string containing a selector expression to match elements against. * @param context A DOM element within which a matching element may be found. * @see \`{@link https://api.jquery.com/closest/ }\` * @since 1.4 */ closest(selector: JQuery.Selector, context: Element): this; /** * 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. * @param selector_selection_element _@param_ `selector_selection_element` *
    * * `selector` — A string containing a selector expression to match elements against.
    * * `selection` — A jQuery object to match elements against.
    * * `element` — An element to match elements against. * @see \`{@link https://api.jquery.com/closest/ }\` * @since 1.3 * @since 1.6 * @example ​ ````Show how event delegation can be done with closest. The closest list element toggles a yellow background when it or its descendent is clicked. ```html closest demo
    • Click me!
    • You can also Click me!
    ​ ``` * @example ​ ````Pass a jQuery object to closest. The closest list element toggles a yellow background when it or its descendent is clicked. ```html closest demo
    • Click me!
    • You can also Click me!
    ​ ``` */ closest(selector_selection_element: JQuery.Selector | Element | JQuery): this; /** * Get the children of each element in the set of matched elements, including text and comment nodes. * @see \`{@link https://api.jquery.com/contents/ }\` * @since 1.2 * @example ​ ````Find all the text nodes inside a paragraph and wrap them with a bold tag. ```html contents demo

    Hello John, how are you doing?

    ​ ``` * @example ​ ````Change the background color of links inside of an iframe. ```html contents demo ​ ``` */ contents(): JQuery; /** * Bind an event handler to the "contextmenu" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/contextmenu/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ contextmenu(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "contextmenu" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/contextmenu/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````To show a "Hello World!" alert box when the contextmenu event is triggered on a paragraph on the page: ```javascript $( "p" ).contextmenu(function() { alert( "Hello World!" ); }); ``` * @example ​ ````Right click to toggle background color. ```html contextmenu demo
    Right click the block ​ ``` */ contextmenu(handler?: JQuery.TypeEventHandler | false): this; /** * Set one or more CSS properties for the set of matched elements. * @param propertyName A CSS property name. * @param value_function _@param_ `value_function` *
    * * `value` — A value to set for the property.
    * * `function` — 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. * @see \`{@link https://api.jquery.com/css/ }\` * @since 1.0 * @since 1.4 * @example ​ ````Change the color of any paragraph to red on mouseover event. ```html css demo

    Just roll the mouse over me.

    Or me to see a color change.

    ​ ``` * @example ​ ````Increase the width of #box by 200 pixels the first time it is clicked. ```html css demo
    Click me to grow
    ​ ``` * @example ​ ````Highlight a clicked word in the paragraph. ```html css demo

    Once upon a time there was a man who lived in a pizza parlor. This man just loved pizza and ate it all the time. He went on to be the happiest man in the world. The end.

    ​ ``` */ css(propertyName: string, value_function: string | number | ((this: TElement, index: number, value: string) => string | number | void | undefined)): this; /** * Set one or more CSS properties for the set of matched elements. * @param properties An object of property-value pairs to set. * @see \`{@link https://api.jquery.com/css/ }\` * @since 1.0 * @example ​ ````Change the font weight and background color on mouseenter and mouseleave. ```html css demo

    Move the mouse over a paragraph.

    Like this one or the one above.

    ​ ``` * @example ​ ````Increase the size of a div when you click it. ```html css demo
    click
    click
    ​ ``` */ css(properties: JQuery.PlainObject string | number | void | undefined)>): this; /** * Get the computed style properties for the first element in the set of matched elements. * @param propertyName A CSS property. * @see \`{@link https://api.jquery.com/css/ }\` * @since 1.0 * @example ​ ````Get the background color of a clicked div. ```html css demo  
    ​ ``` */ css(propertyName: string): string; /** * Get the computed style properties for the first element in the set of matched elements. * @param propertyNames An array of one or more CSS properties. * @see \`{@link https://api.jquery.com/css/ }\` * @since 1.9 * @example ​ ````Get the width, height, text color, and background color of a clicked div. ```html css demo

     

    1
    2
    3
    4
    ​ ``` */ css(propertyNames: string[]): JQuery.PlainObject; /** * Store arbitrary data associated with the matched elements. * @param key A string naming the piece of data to set. * @param value The new data value; this can be any Javascript type except `undefined`. * @see \`{@link https://api.jquery.com/data/ }\` * @since 1.2.3 * @example ​ ````Store then retrieve a value from the div element. ```html data demo
    The values stored were and
    ​ ``` */ data(key: string, value: string | number | boolean | symbol | object | null): this; /** * Store arbitrary data associated with the matched elements. * @param obj An object of key-value pairs of data to update. * @see \`{@link https://api.jquery.com/data/ }\` * @since 1.4.3 */ data(obj: JQuery.PlainObject): this; /** * 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. * @param key Name of the data stored. * @param value `undefined` is not recognized as a data value. Calls such as `.data( "name", undefined )` * will return the jQuery object that it was called on, allowing for chaining. * @see \`{@link https://api.jquery.com/data/ }\` * @since 1.2.3 */ // `unified-signatures` is disabled so that behavior when passing `undefined` to `value` can be documented. Unifying the signatures // results in potential confusion for users from an unexpected parameter. // tslint:disable-next-line:unified-signatures data(key: string, value: undefined): any; /** * 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. * @param key Name of the data stored. * @see \`{@link https://api.jquery.com/data/ }\` * @since 1.2.3 * @example ​ ````Get the data named "blah" stored at for an element. ```html data demo
    A div

    The "blah" value of this div is ?

    ​ ``` */ data(key: string): any; /** * 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. * @see \`{@link https://api.jquery.com/data/ }\` * @since 1.4 */ data(): JQuery.PlainObject; /** * Bind an event handler to the "dblclick" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/dblclick/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ dblclick(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "dblclick" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/dblclick/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````To bind a "Hello World!" alert box to the dblclick event on every paragraph on the page: ```javascript $( "p" ).dblclick(function() { alert( "Hello World!" ); }); ``` * @example ​ ````Double click to toggle background color. ```html dblclick demo
    Double click the block ​ ``` */ dblclick(handler?: JQuery.TypeEventHandler | false): this; /** * Set a timer to delay execution of subsequent items in the queue. * @param duration An integer indicating the number of milliseconds to delay execution of the next item in the queue. * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. * @see \`{@link https://api.jquery.com/delay/ }\` * @since 1.4 * @example ​ ````Animate the hiding and showing of two divs, delaying the first before showing it. ```html delay demo

    ​ ``` */ delay(duration: JQuery.Duration, queueName?: string): this; /** * Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements. * @param selector A selector to filter the elements that trigger the event. * @param eventType A string containing one or more space-separated JavaScript event types, such as "click" or * "keydown," or custom event names. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/delegate/ }\` * @since 1.4.2 * @deprecated ​ Deprecated since 3.0. Use \`{@link on }\`. * * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. * * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. */ delegate( selector: JQuery.Selector, eventType: TType, eventData: TData, handler: JQuery.TypeEventHandler ): this; /** * Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements. * @param selector A selector to filter the elements that trigger the event. * @param eventType A string containing one or more space-separated JavaScript event types, such as "click" or * "keydown," or custom event names. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/delegate/ }\` * @since 1.4.2 * @deprecated ​ Deprecated since 3.0. Use \`{@link on }\`. * * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. * * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. * @example ​ ````Click a paragraph to add another. Note that .delegate() attaches a click event handler to all paragraphs - even new ones. ```html delegate demo

    Click me!

    ​ ``` * @example ​ ````To display each paragraph's text in an alert box whenever it is clicked: ```javascript $( "body" ).delegate( "p", "click", function() { alert( $( this ).text() ); }); ``` * @example ​ ````To cancel a default action and prevent it from bubbling up, return false: ```javascript $( "body" ).delegate( "a", "click", function() { return false; }); ``` * @example ​ ````To cancel only the default action by using the preventDefault method. ```javascript $( "body" ).delegate( "a", "click", function( event ) { event.preventDefault(); }); ``` * @example ​ ````Can bind custom events too. ```html delegate demo

    Has an attached custom event.

    ​ ``` */ delegate( selector: JQuery.Selector, eventType: TType, handler: JQuery.TypeEventHandler | false ): this; /** * Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements. * @param selector A selector to filter the elements that trigger the event. * @param events A plain object of one or more event types and functions to execute for them. * @see \`{@link https://api.jquery.com/delegate/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.0. Use \`{@link on }\`. * * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. * * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. */ delegate(selector: JQuery.Selector, events: JQuery.TypeEventHandlers ): this; /** * Execute the next function on the queue for the matched elements. * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. * @see \`{@link https://api.jquery.com/dequeue/ }\` * @since 1.2 * @example ​ ````Use dequeue to end a custom queue function which allows the queue to keep going. ```html dequeue demo
    ​ ``` */ dequeue(queueName?: string): this; /** * Remove the set of matched elements from the DOM. * @param selector A selector expression that filters the set of matched elements to be removed. * @see \`{@link https://api.jquery.com/detach/ }\` * @since 1.4 * @example ​ ````Detach all paragraphs from the DOM ```html detach demo

    Hello

    how are

    you?

    ​ ``` */ detach(selector?: JQuery.Selector): this; /** * Iterate over a jQuery object, executing a function for each matched element. * @param funсtion A function to execute for each matched element. * @see \`{@link https://api.jquery.com/each/ }\` * @since 1.0 * @example ​ ````Iterate over three divs and sets their color property. ```html each demo
    Click here
    to iterate through
    these divs.
    ​ ``` * @example ​ ````To access a jQuery object instead of the regular DOM element, use $( this ). For example: ```html each demo ​ To do list: (click here to change)
    • Eat
    • Sleep
    • Be merry
    ​ ``` * @example ​ ````Use return false to break out of each() loops early. ```html each demo
    Stop here
    ​ ``` */ each(funсtion: (this: TElement, index: number, element: TElement) => void | false): this; /** * Remove all child nodes of the set of matched elements from the DOM. * @see \`{@link https://api.jquery.com/empty/ }\` * @since 1.0 * @example ​ ````Removes all child nodes (including text nodes) from all paragraphs ```html empty demo

    Hello, Person and person.

    ​ ``` */ empty(): this; /** * End the most recent filtering operation in the current chain and return the set of matched elements to its previous state. * @see \`{@link https://api.jquery.com/end/ }\` * @since 1.0 * @example ​ ````Selects all paragraphs, finds span elements inside these, and reverts the selection back to the paragraphs. ```html end demo

    Hi there how are you doing?

    This span is one of several spans in this sentence.

    Tags in jQuery object initially:
    Tags in jQuery object after find:
    Tags in jQuery object after end:
    ​ ``` * @example ​ ````Selects all paragraphs, finds span elements inside these, and reverts the selection back to the paragraphs. ```html end demo

    Hello, how are you?

    ​ ``` */ end(): this; /** * Reduce the set of matched elements to the one at the specified index. * @param index An integer indicating the 0-based position of the element. * An integer indicating the position of the element, counting backwards from the last element in the set. * @see \`{@link https://api.jquery.com/eq/ }\` * @since 1.1.2 * @since 1.4 * @example ​ ````Turn the div with index 2 blue by adding an appropriate class. ```html eq demo
    ​ ``` */ eq(index: number): this; /** * Merge the contents of an object onto the jQuery prototype to provide new jQuery instance methods. * @param obj An object to merge onto the jQuery prototype. * @see \`{@link https://api.jquery.com/jQuery.fn.extend/ }\` * @since 1.0 * @example ​ ````Add two methods to the jQuery prototype ($.fn) object and then use one of them. ```html jQuery.fn.extend demo ​ ``` */ extend(obj: object): this; /** * Display the matched elements by fading them to opaque. * @param duration A string or number determining how long the animation will run. * @param easing A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/fadeIn/ }\` * @since 1.4.3 */ fadeIn(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; /** * Display the matched elements by fading them to opaque. * @param duration_easing _@param_ `duration_easing` *
    * * `duration` — A string or number determining how long the animation will run.
    * * `easing` — A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/fadeIn/ }\` * @since 1.0 * @since 1.4.3 * @example ​ ````Fades a red block in over the text. Once the animation is done, it quickly fades in more text on top. ```html fadeIn demo

    Let it be known that the party of the first part and the party of the second part are henceforth and hereto directed to assess the allegations for factual correctness... (click!)

    CENSORED!

    ​ ``` */ fadeIn(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; /** * Display the matched elements by fading them to opaque. * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` *
    * * `duration` — A string or number determining how long the animation will run.
    * * `easing` — A string indicating which easing function to use for the transition.
    * * `complete` — A function to call once the animation is complete, called once per matched element.
    * * `options` — A map of additional options to pass to the method. * @see \`{@link https://api.jquery.com/fadeIn/ }\` * @since 1.0 * @since 1.4.3 * @example ​ ````Animates hidden divs to fade in one by one, completing each animation within 600 milliseconds. ```html fadeIn demo Click here...
    ​ ``` */ fadeIn(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; /** * Hide the matched elements by fading them to transparent. * @param duration A string or number determining how long the animation will run. * @param easing A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/fadeOut/ }\` * @since 1.4.3 * @example ​ ````Fades out two divs, one with a "linear" easing and one with the default, "swing," easing. ```html fadeOut demo
    linear
    swing
    ​ ``` */ fadeOut(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; /** * Hide the matched elements by fading them to transparent. * @param duration_easing _@param_ `duration_easing` *
    * * `duration` — A string or number determining how long the animation will run.
    * * `easing` — A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/fadeOut/ }\` * @since 1.0 * @since 1.4.3 * @example ​ ````Fades out spans in one section that you click on. ```html fadeOut demo

    Find the modifiers -

    If you really want to go outside in the cold then make sure to wear your warm jacket given to you by your favorite teacher.

    ​ ``` */ fadeOut(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; /** * Hide the matched elements by fading them to transparent. * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` *
    * * `duration` — A string or number determining how long the animation will run.
    * * `easing` — A string indicating which easing function to use for the transition.
    * * `complete` — A function to call once the animation is complete, called once per matched element.
    * * `options` — A map of additional options to pass to the method. * @see \`{@link https://api.jquery.com/fadeOut/ }\` * @since 1.0 * @since 1.4.3 * @example ​ ````Animates all paragraphs to fade out, completing the animation within 600 milliseconds. ```html fadeOut demo

    If you click on this paragraph you'll see it just fade away.

    ​ ``` */ fadeOut(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; /** * Adjust the opacity of the matched elements. * @param duration A string or number determining how long the animation will run. * @param opacity A number between 0 and 1 denoting the target opacity. * @param easing A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/fadeTo/ }\` * @since 1.4.3 */ fadeTo(duration: JQuery.Duration, opacity: number, easing: string, complete?: (this: TElement) => void): this; /** * Adjust the opacity of the matched elements. * @param duration A string or number determining how long the animation will run. * @param opacity A number between 0 and 1 denoting the target opacity. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/fadeTo/ }\` * @since 1.0 * @example ​ ````Animates first paragraph to fade to an opacity of 0.33 (33%, about one third visible), completing the animation within 600 milliseconds. ```html fadeTo demo

    Click this paragraph to see it fade.

    Compare to this one that won't fade.

    ​ ``` * @example ​ ````Fade div to a random opacity on each click, completing the animation within 200 milliseconds. ```html fadeTo demo

    And this is the library that John built...

    ​ ``` * @example ​ ````Find the right answer! The fade will take 250 milliseconds and change various styles when it completes. ```html fadeTo demo

    Wrong

    Wrong

    Right!

    ​ ``` */ fadeTo(duration: JQuery.Duration, opacity: number, complete?: (this: TElement) => void): this; /** * Display or hide the matched elements by animating their opacity. * @param duration A string or number determining how long the animation will run. * @param easing A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/fadeToggle/ }\` * @since 1.4.4 * @example ​ ````Fades first paragraph in or out, completing the animation within 600 milliseconds and using a linear easing. Fades last paragraph in or out for 200 milliseconds, inserting a "finished" message upon completion. ```html fadeToggle demo

    This paragraph has a slow, linear fade.

    This paragraph has a fast animation.

    ​ ``` */ fadeToggle(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; /** * Display or hide the matched elements by animating their opacity. * @param duration_easing _@param_ `duration_easing` *
    * * `duration` — A string or number determining how long the animation will run.
    * * `easing` — A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/fadeToggle/ }\` * @since 1.0 * @since 1.4.3 * @example ​ ````Fades first paragraph in or out, completing the animation within 600 milliseconds and using a linear easing. Fades last paragraph in or out for 200 milliseconds, inserting a "finished" message upon completion. ```html fadeToggle demo

    This paragraph has a slow, linear fade.

    This paragraph has a fast animation.

    ​ ``` */ fadeToggle(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; /** * Display or hide the matched elements by animating their opacity. * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` *
    * * `duration` — A string or number determining how long the animation will run.
    * * `easing` — A string indicating which easing function to use for the transition.
    * * `complete` — A function to call once the animation is complete, called once per matched element.
    * * `options` — A map of additional options to pass to the method. * @see \`{@link https://api.jquery.com/fadeToggle/ }\` * @since 1.0 * @since 1.4.3 */ fadeToggle(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; /** * Reduce the set of matched elements to those that match the selector or pass the function's test. * @param selector_elements_selection_function _@param_ `selector_elements_selection_function` *
    * * `selector` — A string containing a selector expression to match the current set of elements against.
    * * `elements` — One or more DOM elements to match the current set of elements against.
    * * `selection` — An existing jQuery object to match the current set of elements against.
    * * `function` — A function used as a test for each element in the set. this is the current DOM element. * @see \`{@link https://api.jquery.com/filter/ }\` * @since 1.0 * @since 1.4 * @example ​ ````Change the color of all divs; then add a border to those with a "middle" class. ```html filter demo
    ​ ``` * @example ​ ````Change the color of all divs; then add a border to the second one (index == 1) and the div with an id of "fourth." ```html filter demo
    ​ ``` * @example ​ ````Select all divs and filter the selection with a DOM element, keeping only the one with an id of "unique". ```javascript $( "div" ).filter( document.getElementById( "unique" ) ); ``` * @example ​ ````Select all divs and filter the selection with a jQuery object, keeping only the one with an id of "unique". ```javascript $( "div" ).filter( $( "#unique" ) ); ``` */ filter(selector_elements_selection_function: JQuery.Selector | JQuery.TypeOrArray | JQuery | ((this: TElement, index: number, element: TElement) => boolean) ): this; /** * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. * @param selector_element _@param_ `selector_element` *
    * * `selector` — A string containing a selector expression to match elements against.
    * * `element` — An element or a jQuery object to match elements against. * @see \`{@link https://api.jquery.com/find/ }\` * @since 1.0 * @since 1.6 * @example ​ ````Starts with all paragraphs and searches for descendant span elements, same as $( "p span" ) ```html find demo

    Hello, how are you?

    Me? I'm good.

    ​ ``` * @example ​ ````A selection using a jQuery collection of all span tags. Only spans within p tags are changed to red while others are left blue. ```html find demo

    Hello, how are you?

    Me? I'm good.

    Did you eat yet?
    ​ ``` * @example ​ ````Add spans around each word then add a hover and italicize words with the letter t. ```html find demo

    When the day is short find that which matters to you or stop believing

    ​ ``` */ find(selector_element: JQuery.Selector | Element | JQuery): this; /** * Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements. * @param queue The name of the queue in which to stop animations. * @see \`{@link https://api.jquery.com/finish/ }\` * @since 1.9 * @example ​ ````Click the Go button once to start the animation, and then click the other buttons to see how they affect the current and queued animations. ```html finish demo





    ​ ``` */ finish(queue?: string): this; /** * Reduce the set of matched elements to the first in the set. * @see \`{@link https://api.jquery.com/first/ }\` * @since 1.4 * @example ​ ````Highlight the first span in a paragraph. ```html first demo

    Look: This is some text in a paragraph. This is a note about it.

    ​ ``` */ first(): this; /** * Bind an event handler to the "focus" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/focus/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ focus(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "focus" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/focus/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````Fire focus. ```html focus demo

    focus fire

    focus fire

    ​ ``` * @example ​ ````To stop people from writing in text input boxes, try: ```javascript $( "input[type=text]" ).focus(function() { $( this ).blur(); }); ``` * @example ​ ````To focus on a login input box with id 'login' on page startup, try: ```javascript $( document ).ready(function() { $( "#login" ).focus(); }); ``` */ focus(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "focusin" event. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/focusin/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ focusin(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "focusin" event. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/focusin/ }\` * @since 1.4 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````Watch for a focus to occur within the paragraphs on the page. ```html focusin demo

    focusin fire

    focusin fire

    ​ ``` */ focusin(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "focusout" JavaScript event. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/focusout/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ focusout(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "focusout" JavaScript event. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/focusout/ }\` * @since 1.4 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````Watch for a loss of focus to occur inside paragraphs and note the difference between the focusout count and the blur count. (The blur count does not change because those events do not bubble.) ```html focusout demo


    focusout fire
    blur fire
    ​ ``` */ focusout(handler?: JQuery.TypeEventHandler | false): this; /** * Retrieve one of the elements matched by the jQuery object. * @param index A zero-based integer indicating which element to retrieve. * @see \`{@link https://api.jquery.com/get/ }\` * @since 1.0 * @example ​ ````Display the tag name of the click element. ```html get demo  

    In this paragraph is an important section

    ​ ``` */ get(index: number): TElement; /** * Retrieve the elements matched by the jQuery object. * @see \`{@link https://api.jquery.com/get/ }\` * @since 1.0 * @example ​ ````Select all divs in the document and return the DOM Elements as an Array; then use the built-in reverse() method to reverse that array. ```html get demo ​ Reversed -
    One
    Two
    Three
    ​ ``` */ get(): TElement[]; /** * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element. * @param selector_contained _@param_ `selector_contained` *
    * * `selector` — A string containing a selector expression to match elements against.
    * * `contained` — A DOM element to match elements against. * @see \`{@link https://api.jquery.com/has/ }\` * @since 1.4 * @example ​ ````Check if an element is inside another. ```html has demo
    • Does the UL contain an LI?
    ​ ``` */ has(selector_contained: string | Element): this; /** * Determine whether any of the matched elements are assigned the given class. * @param className The class name to search for. * @see \`{@link https://api.jquery.com/hasClass/ }\` * @since 1.2 * @example ​ ````Looks for the paragraph that contains 'selected' as a class. ```html hasClass demo

    This paragraph is black and is the first paragraph.

    This paragraph is red and is the second paragraph.

    First paragraph has selected class:
    Second paragraph has selected class:
    At least one paragraph has selected class:
    ​ ``` */ hasClass(className: string): boolean; /** * Set the CSS height of every matched element. * @param value_function _@param_ `value_function` *
    * * `value` — An integer representing the number of pixels, or an integer with an optional unit of measure * appended (as a string).
    * * `function` — 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. * @see \`{@link https://api.jquery.com/height/ }\` * @since 1.0 * @since 1.4.1 * @example ​ ````To set the height of each div on click to 30px plus a color change. ```html height demo
    ​ ``` */ height(value_function: string | number | ((this: TElement, index: number, height: number) => string | number)): this; /** * Get the current computed height for the first element in the set of matched elements. * @see \`{@link https://api.jquery.com/height/ }\` * @since 1.0 * @example ​ ````Show various heights. Note the values are from the iframe so might be smaller than you expected. The yellow highlight shows the iframe body. ```html height demo
     

    Sample paragraph to test height

    ​ ``` */ height(): number | undefined; /** * Hide the matched elements. * @param duration A string or number determining how long the animation will run. * @param easing A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/hide/ }\` * @since 1.4.3 */ hide(duration: JQuery.Duration, easing: string, complete: (this: TElement) => void): this; /** * Hide the matched elements. * @param duration A string or number determining how long the animation will run. * @param easing_complete _@param_ `easing_complete` *
    * * `easing` — A string indicating which easing function to use for the transition.
    * * `complete` — A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/hide/ }\` * @since 1.0 * @since 1.4.3 * @example ​ ````Animates all spans (words in this case) to hide fastly, completing each animation within 200 milliseconds. Once each animation is done, it starts the next one. ```html hide demo
    Once upon a time there were three programmers...
    ​ ``` * @example ​ ````Hides the divs when clicked over 2 seconds, then removes the div element when its hidden. Try clicking on more than one box at a time. ```html hide demo
    ​ ``` */ hide(duration: JQuery.Duration, easing_complete: string | ((this: TElement) => void)): this; /** * Hide the matched elements. * @param duration_complete_options _@param_ `duration_complete_options` *
    * * `duration` — A string or number determining how long the animation will run.
    * * `complete` — A function to call once the animation is complete, called once per matched element.
    * * `options` — A map of additional options to pass to the method. * @see \`{@link https://api.jquery.com/hide/ }\` * @since 1.0 * @example ​ ````Hides all paragraphs then the link on click. ```html hide demo

    Hello

    Click to hide me too

    Here is another paragraph

    ​ ``` * @example ​ ````Animates all shown paragraphs to hide slowly, completing the animation within 600 milliseconds. ```html hide demo

    Hiya

    Such interesting text, eh?

    ​ ``` */ hide(duration_complete_options?: JQuery.Duration | ((this: TElement) => void) | JQuery.EffectsOptions): this; /** * Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements. * @param handlerIn A function to execute when the mouse pointer enters the element. * @param handlerOut A function to execute when the mouse pointer leaves the element. * @see \`{@link https://api.jquery.com/hover/ }\` * @since 1.0 * @deprecated ​ Deprecated. * * **Cause**: The `.hover()` method is a shorthand for the use of the `mouseover`/`mouseout` events. It is often a poor user interface choice because it does not allow for any small amounts of delay between when the mouse enters or exits an area and when the event fires. This can make it quite difficult to use with UI widgets such as drop-down menus. For more information on the problems of hovering, see the \`{@link http://cherne.net/brian/resources/jquery.hoverIntent.html hoverIntent plugin}\`. * * **Solution**: Review uses of `.hover()` to determine if they are appropriate, and consider use of plugins such as `hoverIntent` as an alternative. The direct replacement for `.hover(fn1, fn2)`, is `.on("mouseenter", fn1).on("mouseleave", fn2)`. * @example ​ ````To add a special style to list items that are being hovered over, try: ```html hover demo
    • Milk
    • Bread
    • Chips
    • Socks
    ​ ``` * @example ​ ````To add a special style to table cells that are being hovered over, try: ```javascript $( "td" ).hover( function() { $( this ).addClass( "hover" ); }, function() { $( this ).removeClass( "hover" ); } ); ``` * @example ​ ````To unbind the above example use: ```javascript $( "td" ).off( "mouseenter mouseleave" ); ``` */ hover(handlerIn: JQuery.TypeEventHandler | false, handlerOut: JQuery.TypeEventHandler | false): this; /** * Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements. * @param handlerInOut A function to execute when the mouse pointer enters or leaves the element. * @see \`{@link https://api.jquery.com/hover/ }\` * @since 1.4 * @deprecated ​ Deprecated. * * **Cause**: The `.hover()` method is a shorthand for the use of the `mouseover`/`mouseout` events. It is often a poor user interface choice because it does not allow for any small amounts of delay between when the mouse enters or exits an area and when the event fires. This can make it quite difficult to use with UI widgets such as drop-down menus. For more information on the problems of hovering, see the \`{@link http://cherne.net/brian/resources/jquery.hoverIntent.html hoverIntent plugin}\`. * * **Solution**: Review uses of `.hover()` to determine if they are appropriate, and consider use of plugins such as `hoverIntent` as an alternative. The direct replacement for `.hover(fn1, fn2)`, is `.on("mouseenter", fn1).on("mouseleave", fn2)`. * @example ​ ````Slide the next sibling LI up or down on hover, and toggle a class. ```html hover demo
    • Milk
    • White
    • Carrots
    • Orange
    • Broccoli
    • Green
    ​ ``` */ hover(handlerInOut: JQuery.TypeEventHandler | false): this; /** * Set the HTML contents of each element in the set of matched elements. * @param htmlString_function _@param_ `htmlString_function` *
    * * `htmlString` — A string of HTML to set as the content of each matched element.
    * * `function` — 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. * @see \`{@link https://api.jquery.com/html/ }\` * @since 1.0 * @since 1.4 * @example ​ ````Add some html to each div. ```html html demo Hello
    ​ ``` * @example ​ ````Add some html to each div then immediately do further manipulations to the inserted html. ```html html demo
    ​ ``` */ html(htmlString_function: JQuery.htmlString | JQuery.Node | ((this: TElement, index: number, oldhtml: JQuery.htmlString) => JQuery.htmlString | JQuery.Node)): this; /** * Get the HTML contents of the first element in the set of matched elements. * @see \`{@link https://api.jquery.com/html/ }\` * @since 1.0 * @example ​ ````Click a paragraph to convert it from html to text. ```html html demo

    Click to change the html

    to a text node.

    This does nothing.

    ​ ``` */ html(): string; /** * Search for a given element from among the matched elements. * @param selector_element _@param_ `selector_element` *
    * * `selector` — A selector representing a jQuery collection in which to look for an element.
    * * `element` — The DOM element or first element within the jQuery object to look for. * @see \`{@link https://api.jquery.com/index/ }\` * @since 1.0 * @since 1.4 * @example ​ ````On click, returns the index (zero-based) of that div in the page. ```html index demo Click a div!
    First div
    Second div
    Third div
    ​ ``` * @example ​ ````Returns the index for the element with ID bar. ```html index demo
    • foo
    • bar
    • baz
    ​ ``` * @example ​ ````Returns the index for the first item in the jQuery collection. ```html index demo
    • foo
    • bar
    • baz
    ​ ``` * @example ​ ````Returns the index for the element with ID bar in relation to all <li> elements. ```html index demo
    • foo
    • bar
    • baz
    ​ ``` * @example ​ ````Returns the index for the element with ID bar in relation to its siblings. ```html index demo
    • foo
    • bar
    • baz
    ​ ``` * @example ​ ````Returns -1, as there is no element with ID foobar. ```html index demo
    • foo
    • bar
    • baz
    ​ ``` */ index(selector_element?: JQuery.Selector | Element | JQuery): number; /** * Set the CSS inner height of each element in the set of matched elements. * @param value_function _@param_ `value_function` *
    * * `value` — A number representing the number of pixels, or a number along with an optional unit of measure * appended (as a string).
    * * `function` — A function returning the inner height (including padding but not border) to set. Receives the index * position of the element in the set and the old inner height as arguments. Within the function, `this` * refers to the current element in the set. * @see \`{@link https://api.jquery.com/innerHeight/ }\` * @since 1.8.0 * @example ​ ````Change the inner height of each div the first time it is clicked (and change its color). ```html innerHeight demo
    d
    d
    d
    d
    d
    ​ ``` */ innerHeight(value_function: string | number | ((this: TElement, index: number, height: number) => string | number)): this; /** * Get the current computed height for the first element in the set of matched elements, including padding but not border. * @see \`{@link https://api.jquery.com/innerHeight/ }\` * @since 1.2.6 * @example ​ ````Get the innerHeight of a paragraph. ```html innerHeight demo

    Hello

    ​ ``` */ innerHeight(): number | undefined; /** * Set the CSS inner width of each element in the set of matched elements. * @param value_function _@param_ `value_function` *
    * * `value` — A number representing the number of pixels, or a number along with an optional unit of measure * appended (as a string).
    * * `function` — A function returning the inner width (including padding but not border) to set. Receives the index * position of the element in the set and the old inner width as arguments. Within the function, `this` * refers to the current element in the set. * @see \`{@link https://api.jquery.com/innerWidth/ }\` * @since 1.8.0 * @example ​ ````Change the inner width of each div the first time it is clicked (and change its color). ```html innerWidth demo
    d
    d
    d
    d
    d
    ​ ``` */ innerWidth(value_function: string | number | ((this: TElement, index: number, width: number) => string | number)): this; /** * Get the current computed inner width for the first element in the set of matched elements, including padding but not border. * @see \`{@link https://api.jquery.com/innerWidth/ }\` * @since 1.2.6 * @example ​ ````Get the innerWidth of a paragraph. ```html innerWidth demo

    Hello

    ​ ``` */ innerWidth(): number | undefined; /** * Insert every element in the set of matched elements after the target. * @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. * @see \`{@link https://api.jquery.com/insertAfter/ }\` * @since 1.0 * @example ​ ````Insert all paragraphs after an element with id of "foo". Same as $( "#foo" ).after( "p" ) ```html insertAfter demo

    is what I said...

    FOO!
    ​ ``` */ insertAfter(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; /** * Insert every element in the set of matched elements before the target. * @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. * @see \`{@link https://api.jquery.com/insertBefore/ }\` * @since 1.0 * @example ​ ````Insert all paragraphs before an element with id of "foo". Same as $( "#foo" ).before( "p" ) ```html insertBefore demo
    FOO!

    I would like to say:

    ​ ``` */ insertBefore(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; /** * 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. * @param selector_function_selection_elements _@param_ `selector_function_selection_elements` *
    * * `selector` — A string containing a selector expression to match elements against.
    * * `function` — A function used as a test for every element in the set. It accepts two arguments, `index`, which is * the element's index in the jQuery collection, and `element`, which is the DOM element. Within the * function, `this` refers to the current DOM element.
    * * `selection` — An existing jQuery object to match the current set of elements against.
    * * `elements` — One or more elements to match the current set of elements against. * @see \`{@link https://api.jquery.com/is/ }\` * @since 1.0 * @since 1.6 * @example ​ ````Shows a few ways is() can be used inside an event handler. ```html is demo

    Peter

     

    ​ ``` * @example ​ ````Returns true, because the parent of the input is a form element. ```html is demo
    ​ ``` * @example ​ ````Returns false, because the parent of the input is a p element. ```html is demo

    ​ ``` * @example ​ ````Checks against an existing collection of alternating list elements. Blue, alternating list elements slide up while others turn red. ```html is demo
    • Chrome
    • Safari
    • Firefox
    • Opera
    ​ ``` * @example ​ ````An alternate way to achieve the above example using an element rather than a jQuery object. Checks against an existing collection of alternating list elements. Blue, alternating list elements slide up while others turn red. ```html is demo
    • Chrome
    • Safari
    • Firefox
    • Opera
    ​ ``` */ is(selector_function_selection_elements: JQuery.Selector | JQuery.TypeOrArray | JQuery | ((this: TElement, index: number, element: TElement) => boolean)): boolean; /** * Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/keydown/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ keydown(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/keydown/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````Show the event object for the keydown handler when a key is pressed in the input. ```html keydown demo
    ​ ``` */ keydown(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/keypress/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ keypress(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/keypress/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````Show the event object when a key is pressed in the input. Note: This demo relies on a simple $.print() plugin (https://api.jquery.com/resources/events.js) for the event object's output. ```html keypress demo
    ​ ``` */ keypress(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/keyup/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ keyup(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/keyup/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````Show the event object for the keyup handler (using a simple $.print plugin) when a key is released in the input. ```html keyup demo
    ​ ``` */ keyup(handler?: JQuery.TypeEventHandler | false): this; /** * Reduce the set of matched elements to the final one in the set. * @see \`{@link https://api.jquery.com/last/ }\` * @since 1.4 * @example ​ ````Highlight the last span in a paragraph. ```html last demo

    Look: This is some text in a paragraph. This is a note about it.

    ​ ``` */ last(): this; /** * Load data from the server and place the returned HTML into the matched element. * @param url A string containing the URL to which the request is sent. * @param data A plain object or string that is sent to the server with the request. * @param complete A callback function that is executed when the request completes. * @see \`{@link https://api.jquery.com/load/ }\` * @since 1.0 * @example ​ ````Same as above, but will POST the additional parameters to the server and a callback that is executed when the server is finished responding. ```javascript $( "#feeds" ).load( "feeds.php", { limit: 25 }, function() { alert( "The last 25 entries in the feed have been loaded" ); }); ``` */ load(url: string, data: string | JQuery.PlainObject, complete: (this: TElement, responseText: string, textStatus: JQuery.Ajax.TextStatus, jqXHR: JQuery.jqXHR) => void): this; /** * Load data from the server and place the returned HTML into the matched element. * @param url A string containing the URL to which the request is sent. * @param complete_data _@param_ `complete_data` *
    * * `complete` — A callback function that is executed when the request completes.
    * * `data` — A plain object or string that is sent to the server with the request. * @see \`{@link https://api.jquery.com/load/ }\` * @since 1.0 * @example ​ ````Load another page's list items into an ordered list. ```html load demo Projects:
      ​ ``` * @example ​ ````Display a notice if the Ajax request encounters an error. ```html load demo Successful Response (should be blank):
      Error Response:
      ​ ``` * @example ​ ````Load the feeds.html file into the div with the ID of feeds. ```javascript $( "#feeds" ).load( "feeds.html" ); ``` * @example ​ ````pass arrays of data to the server. ```javascript $( "#objectID" ).load( "test.php", { "choices[]": [ "Jon", "Susan" ] } ); ``` */ load(url: string, complete_data?: ((this: TElement, responseText: string, textStatus: JQuery.Ajax.TextStatus, jqXHR: JQuery.jqXHR) => void) | string | JQuery.PlainObject): this; /** * Pass each element in the current matched set through a function, producing a new jQuery object containing the return values. * @param callback A function object that will be invoked for each element in the current set. * @see \`{@link https://api.jquery.com/map/ }\` * @since 1.2 * @example ​ ````Build a list of all the values within a form. ```html map demo

      Values:

      ​ ``` * @example ​ ````A contrived example to show some functionality. ```html map demo
      • First
      • Second
      • Third
      • Fourth
      • Fifth
      ​ ``` * @example ​ ````Equalize the heights of the divs. ```html map demo
      ​ ``` */ map(callback: (this: TElement, index: number, domElement: TElement) => JQuery.TypeOrArray | null | undefined): JQuery; /** * Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/mousedown/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mousedown(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/mousedown/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````Show texts when mouseup and mousedown event triggering. ```html mousedown demo

      Press mouse and release here.

      ​ ``` */ mousedown(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/mouseenter/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseenter(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/mouseenter/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````Show texts when mouseenter and mouseout event triggering. mouseover fires when the pointer moves into the child element as well, while mouseenter fires only when the pointer moves into the bound element. ```html mouseenter demo

      move your mouse

      move your mouse

      0

      0

      move your mouse

      move your mouse

      0

      0

      ​ ``` */ mouseenter(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/mouseleave/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseleave(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/mouseleave/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````Show number of times mouseout and mouseleave events are triggered. mouseout fires when the pointer moves out of child element as well, while mouseleave fires only when the pointer moves out of the bound element. ```html mouseleave demo

      move your mouse

      move your mouse

      0

      0

      move your mouse

      move your mouse

      0

      0

      ​ ``` */ mouseleave(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/mousemove/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mousemove(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/mousemove/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````Show the mouse coordinates when the mouse is moved over the yellow div. Coordinates are relative to the window, which in this case is the iframe. ```html mousemove demo

      Move the mouse over the div.  

      ​ ``` */ mousemove(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/mouseout/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseout(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/mouseout/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````Show the number of times mouseout and mouseleave events are triggered. mouseout fires when the pointer moves out of the child element as well, while mouseleave fires only when the pointer moves out of the bound element. ```html mouseout demo

      move your mouse

      move your mouse

      0

      0

      move your mouse

      move your mouse

      0

      0

      ​ ``` */ mouseout(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/mouseover/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseover(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/mouseover/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````Show the number of times mouseover and mouseenter events are triggered. mouseover fires when the pointer moves into the child element as well, while mouseenter fires only when the pointer moves into the bound element. ```html mouseover demo
      move your mouse
      move your mouse
      ​ ``` */ mouseover(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/mouseup/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ mouseup(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/mouseup/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````Show texts when mouseup and mousedown event triggering. ```html mouseup demo

      Press mouse and release here.

      ​ ``` */ mouseup(handler?: JQuery.TypeEventHandler | false): this; /** * 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. * @param selector A string containing a selector expression to match elements against. * @see \`{@link https://api.jquery.com/next/ }\` * @since 1.0 * @example ​ ````Find the very next sibling of each disabled button and change its text "this button is disabled". ```html next demo
      -
      -
      -
      ​ ``` * @example ​ ````Find the very next sibling of each paragraph. Keep only the ones with a class "selected". ```html next demo

      Hello

      Hello Again

      And Again
      ​ ``` */ next(selector?: JQuery.Selector): this; /** * Get all following siblings of each element in the set of matched elements, optionally filtered by a selector. * @param selector A string containing a selector expression to match elements against. * @see \`{@link https://api.jquery.com/nextAll/ }\` * @since 1.2 * @example ​ ````Locate all the divs after the first and give them a class. ```html nextAll demo
      first
      sibling
      child
      sibling
      sibling
      ​ ``` * @example ​ ````Locate all the paragraphs after the second child in the body and give them a class. ```html nextAll demo

      p

      div

      p

      p

      div

      p

      div
      ​ ``` */ nextAll(selector?: string): this; /** * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. * @param selector_element _@param_ `selector_element` *
      * * `selector` — A string containing a selector expression to indicate where to stop matching following sibling elements.
      * * `element` — A DOM node or jQuery object indicating where to stop matching following sibling elements. * @param filter A string containing a selector expression to match elements against. * @see \`{@link https://api.jquery.com/nextUntil/ }\` * @since 1.4 * @since 1.6 * @example ​ ````Find the siblings that follow <dt id="term-2"> up to the next <dt> and give them a red background color. Also, find <dd> siblings that follow <dt id="term-1"> up to <dt id="term-3"> and give them a green text color. ```html nextUntil demo
      term 1
      definition 1-a
      definition 1-b
      definition 1-c
      definition 1-d
      term 2
      definition 2-a
      definition 2-b
      definition 2-c
      term 3
      definition 3-a
      definition 3-b
      ​ ``` */ nextUntil(selector_element?: JQuery.Selector | Element | JQuery, filter?: JQuery.Selector): this; /** * Remove elements from the set of matched elements. * @param selector_function_selection _@param_ `selector_function_selection` *
      * * `selector` — A string containing a selector expression, a DOM element, or an array of elements to match against the set.
      * * `function` — A function used as a test for each element in the set. It accepts two arguments, `index`, which is * the element's index in the jQuery collection, and `element`, which is the DOM element. Within the * function, `this` refers to the current DOM element.
      * * `selection` — An existing jQuery object to match the current set of elements against. * @see \`{@link https://api.jquery.com/not/ }\` * @since 1.0 * @since 1.4 * @example ​ ````Adds a border to divs that are not green or blue. ```html not demo
      ​ ``` * @example ​ ````Removes the element with the ID "selected" from the set of all paragraphs. ```javascript $( "p" ).not( $( "#selected" )[ 0 ] ); ``` * @example ​ ````Removes the element with the ID "selected" from the set of all paragraphs. ```javascript $( "p" ).not( "#selected" ); ``` * @example ​ ````Removes all elements that match "div p.selected" from the total set of all paragraphs. ```javascript $( "p" ).not( $( "div p.selected" ) ); ``` */ not(selector_function_selection: JQuery.Selector | JQuery.TypeOrArray | JQuery | ((this: TElement, index: number, element: TElement) => boolean)): this; /** * Remove an event handler. * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as * "click", "keydown.myPlugin", or ".myPlugin". * @param selector A selector which should match the one originally passed to .on() when attaching event handlers. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/off/ }\` * @since 1.7 * @example ​ ````Add and remove event handlers on the colored button. ```html off demo
      Click!
      ​ ``` * @example ​ ````Remove just one previously bound handler by passing it as the third argument: ```javascript var foo = function() { // Code to handle some kind of event }; ​ // ... Now foo will be called when paragraphs are clicked ... $( "body" ).on( "click", "p", foo ); ​ // ... Foo will no longer be called. $( "body" ).off( "click", "p", foo ); ``` */ off( events: TType, selector: JQuery.Selector, handler: JQuery.TypeEventHandler | false ): this; /** * Remove an event handler. * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as * "click", "keydown.myPlugin", or ".myPlugin". * @param selector_handler _@param_ `selector_handler` *
      * * `selector` — A selector which should match the one originally passed to `.on()` when attaching event handlers.
      * * `handler` — A handler function previously attached for the event(s), or the special value `false`. * @see \`{@link https://api.jquery.com/off/ }\` * @since 1.7 * @example ​ ````Remove all delegated click handlers from all paragraphs: ```javascript $( "p" ).off( "click", "**" ); ``` * @example ​ ````Unbind all delegated event handlers by their namespace: ```javascript var validate = function() { // Code to validate form entries }; ​ // Delegate events under the ".validator" namespace $( "form" ).on( "click.validator", "button", validate ); ​ $( "form" ).on( "keypress.validator", "input[type='text']", validate ); ​ // Remove event handlers in the ".validator" namespace $( "form" ).off( ".validator" ); ``` */ off( events: TType, selector_handler?: JQuery.Selector | JQuery.TypeEventHandler | false ): this; /** * Remove an event handler. * @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). * @param selector A selector which should match the one originally passed to .on() when attaching event handlers. * @see \`{@link https://api.jquery.com/off/ }\` * @since 1.7 */ off(events: JQuery.TypeEventHandlers, selector?: JQuery.Selector): this; /** * Remove an event handler. * @param event A jQuery.Event object. * @see \`{@link https://api.jquery.com/off/ }\` * @since 1.7 * @example ​ ````Remove all event handlers from all paragraphs: ```javascript $( "p" ).off(); ``` */ off(event?: JQuery.TriggeredEvent): this; /** * Set the current coordinates of every element in the set of matched elements, relative to the document. * @param coordinates_function _@param_ `coordinates_function` *
      * * `coordinates` — An object containing the properties `top` and `left`, which are numbers indicating the new top and * left coordinates for the elements.
      * * `function` — 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. * @see \`{@link https://api.jquery.com/offset/ }\` * @since 1.4 * @example ​ ````Set the offset of the second paragraph: ```html offset demo

      Hello

      2nd Paragraph

      ​ ``` */ offset(coordinates_function: JQuery.CoordinatesPartial | ((this: TElement, index: number, coords: JQuery.Coordinates) => JQuery.CoordinatesPartial)): this; /** * Get the current coordinates of the first element in the set of matched elements, relative to the document. * @see \`{@link https://api.jquery.com/offset/ }\` * @since 1.2 * @example ​ ````Access the offset of the second paragraph: ```html offset demo

      Hello

      2nd Paragraph

      ​ ``` * @example ​ ````Click to see the offset. ```html offset demo
      Click an element.

      This is the best way to find an offset.

      ​ ``` */ offset(): JQuery.Coordinates | undefined; /** * Get the closest ancestor element that is positioned. * @see \`{@link https://api.jquery.com/offsetParent/ }\` * @since 1.2.6 * @example ​ ````Find the offsetParent of item "A." ```html offsetParent demo
      • I
      • II
        • A
        • B
          • 1
          • 2
          • 3
        • C
      • III
      ​ ``` */ offsetParent(): this; /** * Attach an event handler function for one or more events to the selected elements. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". * @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. * @param data Data to be passed to the handler in event.data when an event is triggered. * @param handler A function to execute when the event is triggered. * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 */ on( events: TType, selector: JQuery.Selector, data: TData, handler: JQuery.TypeEventHandler ): this; /** * Attach an event handler function for one or more events to the selected elements. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". * @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. * @param data Data to be passed to the handler in event.data when an event is triggered. * @param handler A function to execute when the event is triggered. * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 */ on( events: TType, selector: null | undefined, data: TData, handler: JQuery.TypeEventHandler ): this; /** * Attach an event handler function for one or more events to the selected elements. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". * @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. * @param data Data to be passed to the handler in event.data when an event is triggered. * @param handler A function to execute when the event is triggered. * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\` in place of \`{@link JQueryEventObject }\`. */ on(events: string, selector: JQuery.Selector | null | undefined, data: any, handler: ((event: JQueryEventObject) => void)): this; /** * Attach an event handler function for one or more events to the selected elements. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". * @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. * @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. * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 * @example ​ ````Click any paragraph to add another after it. Note that .on() allows a click event on any paragraph--even new ones--since the event is handled by the ever-present body element after it bubbles to there. ```html on demo

      Click me!

      ​ ``` * @example ​ ````Display each paragraph's text in an alert box whenever it is clicked: ```javascript $( "body" ).on( "click", "p", function() { alert( $( this ).text() ); }); ``` * @example ​ ````Cancel a link's default action using the .preventDefault() method: ```javascript $( "body" ).on( "click", "a", function( event ) { event.preventDefault(); }); ``` */ on( events: TType, selector: JQuery.Selector, handler: JQuery.TypeEventHandler | false ): this; /** * Attach an event handler function for one or more events to the selected elements. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". * @param data Data to be passed to the handler in event.data when an event is triggered. * @param handler A function to execute when the event is triggered. * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 * @example ​ ````Pass data to the event handler, which is specified here by name: ```javascript function myHandler( event ) { alert( event.data.foo ); } $( "p" ).on( "click", { foo: "bar" }, myHandler ); ``` */ on( events: TType, data: TData, handler: JQuery.TypeEventHandler ): this; /** * Attach an event handler function for one or more events to the selected elements. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". * @param selector_data _@param_ `selector_data` *
      * * `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.
      * * `data` — Data to be passed to the handler in event.data when an event is triggered. * @param handler A function to execute when the event is triggered. * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\` in place of \`{@link JQueryEventObject }\`. * @example ​ ````Click any paragraph to add another after it. Note that .on() allows a click event on any paragraph--even new ones--since the event is handled by the ever-present body element after it bubbles to there. ```html on demo

      Click me!

      ​ ``` * @example ​ ````Display each paragraph's text in an alert box whenever it is clicked: ```javascript $( "body" ).on( "click", "p", function() { alert( $( this ).text() ); }); ``` * @example ​ ````Cancel a link's default action using the .preventDefault() method: ```javascript $( "body" ).on( "click", "a", function( event ) { event.preventDefault(); }); ``` * @example ​ ````Pass data to the event handler, which is specified here by name: ```javascript function myHandler( event ) { alert( event.data.foo ); } $( "p" ).on( "click", { foo: "bar" }, myHandler ); ``` */ on(events: string, selector_data: any, handler: ((event: JQueryEventObject) => void)): this; /** * Attach an event handler function for one or more events to the selected elements. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". * @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. * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 * @example ​ ````Display a paragraph's text in an alert when it is clicked: ```javascript $( "p" ).on( "click", function() { alert( $( this ).text() ); }); ``` * @example ​ ````Cancel a form submit action and prevent the event from bubbling up by returning false: ```javascript $( "form" ).on( "submit", false ); ``` * @example ​ ````Cancel only the default action by using .preventDefault(). ```javascript $( "form" ).on( "submit", function( event ) { event.preventDefault(); }); ``` * @example ​ ````Stop submit events from bubbling without preventing form submit, using .stopPropagation(). ```javascript $( "form" ).on( "submit", function( event ) { event.stopPropagation(); }); ``` * @example ​ ````Pass data to the event handler using the second argument to .trigger() ```javascript $( "div" ).on( "click", function( event, person ) { alert( "Hello, " + person.name ); }); $( "div" ).trigger( "click", { name: "Jim" } ); ``` * @example ​ ````Use the the second argument of .trigger() to pass an array of data to the event handler ```javascript $( "div" ).on( "click", function( event, salutation, name ) { alert( salutation + ", " + name ); }); $( "div" ).trigger( "click", [ "Goodbye", "Jim" ] ); ``` * @example ​ ````Attach and trigger custom (non-browser) events. ```html on demo

      Has an attached custom event.

      ​ ``` * @example ​ ````Attach multiple events—one on mouseenter and one on mouseleave to the same element: ```javascript $( "#cart" ).on( "mouseenter mouseleave", function( event ) { $( this ).toggleClass( "active" ); }); ``` */ on( events: TType, handler: JQuery.TypeEventHandler | false ): this; /** * Attach an event handler function for one or more events to the selected elements. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". * @param handler A function to execute when the event is triggered. * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\` in place of \`{@link JQueryEventObject }\`. * @example ​ ````Display a paragraph's text in an alert when it is clicked: ```javascript $( "p" ).on( "click", function() { alert( $( this ).text() ); }); ``` * @example ​ ````Cancel a form submit action and prevent the event from bubbling up by returning false: ```javascript $( "form" ).on( "submit", false ); ``` * @example ​ ````Cancel only the default action by using .preventDefault(). ```javascript $( "form" ).on( "submit", function( event ) { event.preventDefault(); }); ``` * @example ​ ````Stop submit events from bubbling without preventing form submit, using .stopPropagation(). ```javascript $( "form" ).on( "submit", function( event ) { event.stopPropagation(); }); ``` * @example ​ ````Pass data to the event handler using the second argument to .trigger() ```javascript $( "div" ).on( "click", function( event, person ) { alert( "Hello, " + person.name ); }); $( "div" ).trigger( "click", { name: "Jim" } ); ``` * @example ​ ````Use the the second argument of .trigger() to pass an array of data to the event handler ```javascript $( "div" ).on( "click", function( event, salutation, name ) { alert( salutation + ", " + name ); }); $( "div" ).trigger( "click", [ "Goodbye", "Jim" ] ); ``` * @example ​ ````Attach and trigger custom (non-browser) events. ```html on demo

      Has an attached custom event.

      ​ ``` * @example ​ ````Attach multiple events—one on mouseenter and one on mouseleave to the same element: ```javascript $( "#cart" ).on( "mouseenter mouseleave", function( event ) { $( this ).toggleClass( "active" ); }); ``` */ on(events: string, handler: ((event: JQueryEventObject) => void)): this; /** * Attach an event handler function for one or more events to the selected elements. * @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). * @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. * @param data Data to be passed to the handler in event.data when an event occurs. * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 */ on( events: JQuery.TypeEventHandlers, selector: JQuery.Selector, data: TData ): this; /** * Attach an event handler function for one or more events to the selected elements. * @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). * @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. * @param data Data to be passed to the handler in event.data when an event occurs. * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 */ on( events: JQuery.TypeEventHandlers, selector: null | undefined, data: TData ): this; /** * Attach an event handler function for one or more events to the selected elements. * @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). * @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. * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 */ on(events: JQuery.TypeEventHandlers, selector: JQuery.Selector ): this; /** * Attach an event handler function for one or more events to the selected elements. * @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). * @param data Data to be passed to the handler in event.data when an event occurs. * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 */ on( events: JQuery.TypeEventHandlers, data: TData ): this; /** * Attach an event handler function for one or more events to the selected elements. * @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). * @see \`{@link https://api.jquery.com/on/ }\` * @since 1.7 * @example ​ ````Attach multiple event handlers simultaneously using a plain object. ```html on demo
      test div
      ​ ``` */ on(events: JQuery.TypeEventHandlers): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". * @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. * @param data Data to be passed to the handler in event.data when an event is triggered. * @param handler A function to execute when the event is triggered. * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ one( events: TType, selector: JQuery.Selector, data: TData, handler: JQuery.TypeEventHandler ): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". * @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. * @param data Data to be passed to the handler in event.data when an event is triggered. * @param handler A function to execute when the event is triggered. * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ one( events: TType, selector: null | undefined, data: TData, handler: JQuery.TypeEventHandler ): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". * @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. * @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. * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ one( events: TType, selector: JQuery.Selector, handler: JQuery.TypeEventHandler | false ): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". * @param data Data to be passed to the handler in event.data when an event is triggered. * @param handler A function to execute when the event is triggered. * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ one( events: TType, data: TData, handler: JQuery.TypeEventHandler ): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". * @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. * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 * @example ​ ````Tie a one-time click to each div. ```html one demo

      Click a green square...

      ​ ``` * @example ​ ````To display the text of all paragraphs in an alert box the first time each of them is clicked: ```javascript $( "p" ).one( "click", function() { alert( $( this ).text() ); }); ``` * @example ​ ````Event handlers will trigger once per element per event type ```html one demo
      0
      Hover/click me
      ​ ``` */ one( events: TType, handler: JQuery.TypeEventHandler| false ): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @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). * @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. * @param data Data to be passed to the handler in event.data when an event occurs. * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ one( events: JQuery.TypeEventHandlers, selector: JQuery.Selector, data: TData ): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @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). * @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. * @param data Data to be passed to the handler in event.data when an event occurs. * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ one( events: JQuery.TypeEventHandlers, selector: null | undefined, data: TData ): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @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). * @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. * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ one(events: JQuery.TypeEventHandlers, selector: JQuery.Selector): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @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). * @param data Data to be passed to the handler in event.data when an event occurs. * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ one( events: JQuery.TypeEventHandlers, data: TData ): this; /** * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. * @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). * @see \`{@link https://api.jquery.com/one/ }\` * @since 1.7 */ one(events: JQuery.TypeEventHandlers): this; /** * Set the CSS outer height of each element in the set of matched elements. * @param value_function _@param_ `value_function` *
      * * `value` — A number representing the number of pixels, or a number along with an optional unit of measure * appended (as a string).
      * * `function` — A function returning the outer height to set. Receives the index position of the element in the set * and the old outer height as arguments. Within the function, `this` refers to the current element in * the set. * @see \`{@link https://api.jquery.com/outerHeight/ }\` * @since 1.8.0 * @example ​ ````Change the outer height of each div the first time it is clicked (and change its color). ```html outerHeight demo
      d
      d
      d
      d
      d
      ​ ``` */ outerHeight(value_function: string | number | ((this: TElement, index: number, height: number) => string | number), includeMargin?: boolean): this; /** * Get the current computed outer height (including padding, border, and optionally margin) for the first element in the set of matched elements. * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation. * @see \`{@link https://api.jquery.com/outerHeight/ }\` * @since 1.2.6 * @example ​ ````Get the outerHeight of a paragraph. ```html outerHeight demo

      Hello

      ​ ``` */ outerHeight(includeMargin?: boolean): number | undefined; /** * Set the CSS outer width of each element in the set of matched elements. * @param value_function _@param_ `value_function` *
      * * `value` — A number representing the number of pixels, or a number along with an optional unit of measure * appended (as a string).
      * * `function` — A function returning the outer width to set. Receives the index position of the element in the set * and the old outer width as arguments. Within the function, `this` refers to the current element in * the set. * @see \`{@link https://api.jquery.com/outerWidth/ }\` * @since 1.8.0 * @example ​ ````Change the outer width of each div the first time it is clicked (and change its color). ```html outerWidth demo
      d
      d
      d
      d
      d
      ​ ``` */ outerWidth(value_function: string | number | ((this: TElement, index: number, width: number) => string | number), includeMargin?: boolean): this; /** * Get the current computed outer width (including padding, border, and optionally margin) for the first element in the set of matched elements. * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation. * @see \`{@link https://api.jquery.com/outerWidth/ }\` * @since 1.2.6 * @example ​ ````Get the outerWidth of a paragraph. ```html outerWidth demo

      Hello

      ​ ``` */ outerWidth(includeMargin?: boolean): number | undefined; /** * Get the parent of each element in the current set of matched elements, optionally filtered by a selector. * @param selector A string containing a selector expression to match elements against. * @see \`{@link https://api.jquery.com/parent/ }\` * @since 1.0 * @example ​ ````Shows the parent of each element as (parent > child). Check the View Source to see the raw html. ```html parent demo
      div, span, b

      p, span, em

      div, strong, span, em, b, b
      ​ ``` * @example ​ ````Find the parent element of each paragraph with a class "selected". ```html parent demo

      Hello

      Hello Again

      ​ ``` */ parent(selector?: JQuery.Selector): this; /** * Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector. * @param selector A string containing a selector expression to match elements against. * @see \`{@link https://api.jquery.com/parents/ }\` * @since 1.0 * @example ​ ````Find all parent elements of each b. ```html parents demo

      My parents are:

      ​ ``` * @example ​ ````Click to find all unique div parent elements of each span. ```html parents demo

      Hello
      Hello Again
      And Hello Again

      Click Hellos to toggle their parents. ​ ``` */ parents(selector?: JQuery.Selector): this; /** * 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. * @param selector_element _@param_ `selector_element` *
      * * `selector` — A string containing a selector expression to indicate where to stop matching ancestor elements.
      * * `element` — A DOM node or jQuery object indicating where to stop matching ancestor elements. * @param filter A string containing a selector expression to match elements against. * @see \`{@link https://api.jquery.com/parentsUntil/ }\` * @since 1.4 * @since 1.6 * @example ​ ````Find the ancestors of <li class="item-a"> up to <ul class="level-1"> and give them a red background color. Also, find ancestors of <li class="item-2"> that have a class of "yes" up to <ul class="level-1"> and give them a green border. ```html parentsUntil demo
      • I
      • II
        • A
        • B
          • 1
          • 2
          • 3
        • C
      • III
      ​ ``` */ parentsUntil(selector_element?: JQuery.Selector | Element | JQuery, filter?: JQuery.Selector): this; /** * Get the current coordinates of the first element in the set of matched elements, relative to the offset parent. * @see \`{@link https://api.jquery.com/position/ }\` * @since 1.2 * @example ​ ````Access the position of the second paragraph: ```html position demo

      Hello

      ​ ``` */ position(): JQuery.Coordinates; /** * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. * @param contents One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or * jQuery objects to insert at the beginning of each element in the set of matched elements. * @see \`{@link https://api.jquery.com/prepend/ }\` * @since 1.0 * @example ​ ````Prepends some HTML to all paragraphs. ```html prepend demo

      there, friend!

      amigo!

      ​ ``` * @example ​ ````Prepends a DOM Element to all paragraphs. ```html prepend demo

      is what I'd say

      is what I said

      ​ ``` * @example ​ ````Prepends a jQuery object (similar to an Array of DOM Elements) to all paragraphs. ```html prepend demo

      is what was said.

      Hello ​ ``` */ prepend(...contents: Array>>): this; /** * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. * @param funсtion A function that returns an HTML string, DOM element(s), text node(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. * @see \`{@link https://api.jquery.com/prepend/ }\` * @since 1.4 */ prepend(funсtion: (this: TElement, index: number, html: string) => JQuery.htmlString | JQuery.TypeOrArray>): this; /** * Insert every element in the set of matched elements to the beginning of the target. * @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. * @see \`{@link https://api.jquery.com/prependTo/ }\` * @since 1.0 * @example ​ ````Prepend all spans to the element with the ID "foo" (Check .prepend() documentation for more examples) ```html prependTo demo
      FOO!
      I have something to say... ​ ``` */ prependTo(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery): this; /** * Get the immediately preceding sibling of each element in the set of matched elements. If a selector is provided, it retrieves the previous sibling only if it matches that selector. * @param selector A string containing a selector expression to match elements against. * @see \`{@link https://api.jquery.com/prev/ }\` * @since 1.0 * @example ​ ````Find the very previous sibling of each div. ```html prev demo
      has child

      ​ ``` * @example ​ ````For each paragraph, find the very previous sibling that has a class "selected". ```html prev demo
      Hello

      Hello Again

      And Again

      ​ ``` */ prev(selector?: JQuery.Selector): this; /** * Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector. * @param selector A string containing a selector expression to match elements against. * @see \`{@link https://api.jquery.com/prevAll/ }\` * @since 1.2 * @example ​ ````Locate all the divs preceding the last div and give them a class. ```html prevAll demo
      ​ ``` */ prevAll(selector?: JQuery.Selector): this; /** * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. * @param selector_element _@param_ `selector_element` *
      * * `selector` — A string containing a selector expression to indicate where to stop matching preceding sibling elements.
      * * `element` — A DOM node or jQuery object indicating where to stop matching preceding sibling elements. * @param filter A string containing a selector expression to match elements against. * @see \`{@link https://api.jquery.com/prevUntil/ }\` * @since 1.4 * @since 1.6 * @example ​ ````Find the siblings that precede <dt id="term-2"> up to the preceding <dt> and give them a red background color. Also, find previous <dd> siblings of <dt id="term-3"> up to <dt id="term-1"> and give them a green text color. ```html prevUntil demo
      term 1
      definition 1-a
      definition 1-b
      definition 1-c
      definition 1-d
      term 2
      definition 2-a
      definition 2-b
      definition 2-c
      term 3
      definition 3-a
      definition 3-b
      ​ ``` */ prevUntil(selector_element?: JQuery.Selector | Element | JQuery, filter?: JQuery.Selector): this; /** * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished. * @param type The type of queue that needs to be observed. * @param target Object onto which the promise methods have to be attached * @see \`{@link https://api.jquery.com/promise/ }\` * @since 1.6 */ promise(type: string, target: T): T & JQuery.Promise; /** * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished. * @param target Object onto which the promise methods have to be attached * @see \`{@link https://api.jquery.com/promise/ }\` * @since 1.6 */ promise(target: T): T & JQuery.Promise; /** * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished. * @param type The type of queue that needs to be observed. * @see \`{@link https://api.jquery.com/promise/ }\` * @since 1.6 * @example ​ ````Using .promise() on a collection with no active animation returns a resolved Promise: ```javascript var div = $( "
      " ); ​ div.promise().done(function( arg1 ) { // Will fire right away and alert "true" alert( this === div && arg1 === div ); }); ``` * @example ​ ````Resolve the returned Promise when all animations have ended (including those initiated in the animation callback or added later on): ```html promise demo

      Ready...

      ​ ``` * @example ​ ````Resolve the returned Promise using a $.when() statement (the .promise() method makes it possible to do this with jQuery collections): ```html promise demo

      Ready...

      ​ ``` */ promise(type?: string): JQuery.Promise; /** * Set one or more properties for the set of matched elements. * @param propertyName The name of the property to set. * @param value_function _@param_ `value_function` *
      * * `value` — A value to set for the property.
      * * `function` — 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. * @see \`{@link https://api.jquery.com/prop/ }\` * @since 1.6 */ prop(propertyName: string, value_function: string | number | boolean | symbol | object | null | undefined | ((this: TElement, index: number, oldPropertyValue: any) => any)): this; /** * Set one or more properties for the set of matched elements. * @param properties An object of property-value pairs to set. * @see \`{@link https://api.jquery.com/prop/ }\` * @since 1.6 * @example ​ ````Disable all checkboxes on the page. ```html prop demo ​ ``` */ prop(properties: JQuery.PlainObject): this; /** * Get the value of a property for the first element in the set of matched elements. * @param propertyName The name of the property to get. * @see \`{@link https://api.jquery.com/prop/ }\` * @since 1.6 * @example ​ ````Display the checked property and attribute of a checkbox as it changes. ```html prop demo

      ​ ``` */ prop(propertyName: string): any; /** * Add a collection of DOM elements onto the jQuery stack. * @param elements An array of elements to push onto the stack and make into a new jQuery object. * @param name The name of a jQuery method that generated the array of elements. * @param args The arguments that were passed in to the jQuery method (for serialization). * @see \`{@link https://api.jquery.com/pushStack/ }\` * @since 1.3 */ pushStack(elements: ArrayLike, name: string, args: any[]): this; /** * Add a collection of DOM elements onto the jQuery stack. * @param elements An array of elements to push onto the stack and make into a new jQuery object. * @see \`{@link https://api.jquery.com/pushStack/ }\` * @since 1.0 * @example ​ ````Add some elements onto the jQuery stack, then pop back off again. ```javascript jQuery([]) .pushStack( document.getElementsByTagName( "div" ) ) .remove() .end(); ``` */ pushStack(elements: ArrayLike): this; /** * Manipulate the queue of functions to be executed, once for each matched element. * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. * @param newQueue The new function to add to the queue, with a function to call that will dequeue the next item. * An array of functions to replace the current queue contents. * @see \`{@link https://api.jquery.com/queue/ }\` * @since 1.2 * @example ​ ````Set a queue array to delete the queue. ```html queue demo
      ​ ``` */ queue(queueName: string, newQueue: JQuery.TypeOrArray>): this; /** * Manipulate the queue of functions to be executed, once for each matched element. * @param newQueue The new function to add to the queue, with a function to call that will dequeue the next item. * An array of functions to replace the current queue contents. * @see \`{@link https://api.jquery.com/queue/ }\` * @since 1.2 * @example ​ ````Queue a custom function. ```html queue demo ​ Click here...
      ​ ``` */ queue(newQueue: JQuery.TypeOrArray>): this; /** * Show the queue of functions to be executed on the matched elements. * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. * @see \`{@link https://api.jquery.com/queue/ }\` * @since 1.2 * @example ​ ````Show the length of the queue. ```html queue demo

      The queue length is:

      ​ ``` */ queue(queueName?: string): JQuery.Queue; /** * Specify a function to execute when the DOM is fully loaded. * @param handler A function to execute after the DOM is ready. * @see \`{@link https://api.jquery.com/ready/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.0. Use `jQuery(function() { })`. * @example ​ ````Display a message when the DOM is loaded. ```html ready demo

      Not loaded yet.

      ​ ``` */ ready(handler: ($: JQueryStatic) => void): this; /** * Remove the set of matched elements from the DOM. * @param selector A selector expression that filters the set of matched elements to be removed. * @see \`{@link https://api.jquery.com/remove/ }\` * @since 1.0 * @example ​ ````Removes all paragraphs from the DOM ```html remove demo

      Hello

      how are

      you?

      ​ ``` * @example ​ ````Removes all paragraphs that contain "Hello" from the DOM. Analogous to doing $("p").filter(":contains('Hello')").remove(). ```html remove demo

      Hello

      how are

      you?

      ​ ``` */ remove(selector?: string): this; /** * Remove an attribute from each element in the set of matched elements. * @param attributeName An attribute to remove; as of version 1.7, it can be a space-separated list of attributes. * @see \`{@link https://api.jquery.com/removeAttr/ }\` * @since 1.0 * @example ​ ````Clicking the button changes the title of the input next to it. Move the mouse pointer over the text input to see the effect of adding and removing the title attribute. ```html removeAttr demo
      ​ ``` */ removeAttr(attributeName: string): this; /** * Remove a single class, multiple classes, or all classes from each element in the set of matched elements. * @param className_function _@param_ `className_function` *
      * * `className` — One or more space-separated classes to be removed from the class attribute of each matched element.
      * * `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. * @see \`{@link https://api.jquery.com/removeClass/ }\` * @since 1.0 * @since 1.4 * @since 3.3 * @example ​ ````Remove the class 'blue' from the matched elements. ```html removeClass demo

      Hello

      and

      then

      Goodbye

      ​ ``` * @example ​ ````Remove the class 'blue' and 'under' from the matched elements. ```html removeClass demo

      Hello

      and

      then

      Goodbye

      ​ ``` * @example ​ ````Remove all the classes from the matched elements. ```html removeClass demo

      Hello

      and

      then

      Goodbye

      ​ ``` */ removeClass(className_function?: JQuery.TypeOrArray | ((this: TElement, index: number, className: string) => string)): this; /** * Remove a previously-stored piece of data. * @param name A string naming the piece of data to delete. * An array or space-separated string naming the pieces of data to delete. * @see \`{@link https://api.jquery.com/removeData/ }\` * @since 1.2.3 * @since 1.7 * @example ​ ````Set a data store for 2 names then remove one of them. ```html removeData demo
      value1 before creation:
      value1 after creation:
      value1 after removal:
      value2 after removal:
      ​ ``` */ removeData(name?: JQuery.TypeOrArray): this; /** * Remove a property for the set of matched elements. * @param propertyName The name of the property to remove. * @see \`{@link https://api.jquery.com/removeProp/ }\` * @since 1.6 * @example ​ ````Set a numeric property on a paragraph and then remove it. ```html removeProp demo

      ​ ``` */ removeProp(propertyName: string): this; /** * Replace each target element with the set of matched elements. * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace. * @see \`{@link https://api.jquery.com/replaceAll/ }\` * @since 1.2 * @example ​ ````Replace all the paragraphs with bold words. ```html replaceAll demo

      Hello

      cruel

      World

      ​ ``` */ replaceAll(target: JQuery.Selector | JQuery | JQuery.TypeOrArray): this; /** * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. * @param newContent_function _@param_ `newContent_function` *
      * * `newContent` — The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object.
      * * `function` — A function that returns content with which to replace the set of matched elements. * @see \`{@link https://api.jquery.com/replaceWith/ }\` * @since 1.2 * @since 1.4 * @example ​ ````On click, replace the button with a div containing the same word. ```html replaceWith demo ​ ``` * @example ​ ````Replace all paragraphs with bold words. ```html replaceWith demo

      Hello

      cruel

      World

      ​ ``` * @example ​ ````On click, replace each paragraph with a div that is already in the DOM and selected with the $() function. Notice it doesn't clone the object but rather moves it to replace the paragraph. ```html replaceWith demo

      Hello

      cruel

      World

      Replaced!
      ​ ``` * @example ​ ````On button click, replace the containing div with its child divs and append the class name of the selected element to the paragraph. ```html replaceWith demo

      Scooby
      Dooby
      Doo
      ​ ``` */ replaceWith(newContent_function: JQuery.htmlString | JQuery | JQuery.TypeOrArray | JQuery.Node | ((this: TElement, index: number, oldhtml: JQuery.htmlString) => JQuery.htmlString | JQuery | JQuery.TypeOrArray | JQuery.Node)): this; /** * Bind an event handler to the "resize" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/resize/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ resize(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "resize" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/resize/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````To see the window width while (or after) it is resized, try: ```javascript $( window ).resize(function() { $( "body" ).prepend( "
      " + $( window ).width() + "
      " ); }); ``` */ resize(handler?: JQuery.TypeEventHandler | false): this; /** * Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/scroll/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ scroll(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/scroll/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````To do something when your page is scrolled: ```html scroll demo
      Try scrolling the iframe.

      Paragraph - Scroll happened!

      ​ ``` */ scroll(handler?: JQuery.TypeEventHandler | false): this; /** * Set the current horizontal position of the scroll bar for each of the set of matched elements. * @param value An integer indicating the new position to set the scroll bar to. * @see \`{@link https://api.jquery.com/scrollLeft/ }\` * @since 1.2.6 * @example ​ ````Set the scrollLeft of a div. ```html scrollLeft demo

      lalala

      Hello

      ​ ``` */ scrollLeft(value: number): this; /** * Get the current horizontal position of the scroll bar for the first element in the set of matched elements. * @see \`{@link https://api.jquery.com/scrollLeft/ }\` * @since 1.2.6 * @example ​ ````Get the scrollLeft of a paragraph. ```html scrollLeft demo

      Hello

      ​ ``` */ scrollLeft(): number | undefined; /** * Set the current vertical position of the scroll bar for each of the set of matched elements. * @param value A number indicating the new position to set the scroll bar to. * @see \`{@link https://api.jquery.com/scrollTop/ }\` * @since 1.2.6 * @example ​ ````Set the scrollTop of a div. ```html scrollTop demo

      lalala

      Hello

      ​ ``` */ scrollTop(value: number): this; /** * 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. * @see \`{@link https://api.jquery.com/scrollTop/ }\` * @since 1.2.6 * @example ​ ````Get the scrollTop of a paragraph. ```html scrollTop demo

      Hello

      ​ ``` */ scrollTop(): number | undefined; /** * Bind an event handler to the "select" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/select/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ select(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "select" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/select/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````To do something when text in input boxes is selected: ```html select demo

      Click and drag the mouse to select text in the inputs.

      ​ ``` * @example ​ ````To trigger the select event on all input elements, try: ```javascript $( "input" ).select(); ``` */ select(handler?: JQuery.TypeEventHandler | false): this; /** * Encode a set of form elements as a string for submission. * @see \`{@link https://api.jquery.com/serialize/ }\` * @since 1.0 * @example ​ ````Serialize a form to a query string that could be sent to a server in an Ajax request. ```html serialize demo



      ​ ``` */ serialize(): string; /** * Encode a set of form elements as an array of names and values. * @see \`{@link https://api.jquery.com/serializeArray/ }\` * @since 1.2 * @example ​ ````Get the values from a form, iterate through them, and append them to a results display. ```html serializeArray demo

      Results:


      ​ ``` */ serializeArray(): JQuery.NameValuePair[]; /** * Display the matched elements. * @param duration A string or number determining how long the animation will run. * @param easing A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/show/ }\` * @since 1.4.3 */ show(duration: JQuery.Duration, easing: string, complete: (this: TElement) => void): this; /** * Display the matched elements. * @param duration A string or number determining how long the animation will run. * @param easing_complete _@param_ `easing_complete` *
      * * `easing` — A string indicating which easing function to use for the transition.
      * * `complete` — A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/show/ }\` * @since 1.0 * @since 1.4.3 * @example ​ ````Show the first div, followed by each next adjacent sibling div in order, with a 200ms animation. Each animation starts when the previous sibling div's animation ends. ```html show demo
      Hello 3,
      how
      are
      you?
      ​ ``` * @example ​ ````Show all span and input elements with an animation. Change the text once the animation is done. ```html show demo Are you sure? (type 'yes' if you are)

      I'm hidden...

      ​ ``` */ show(duration: JQuery.Duration, easing_complete: string | ((this: TElement) => void)): this; /** * Display the matched elements. * @param duration_complete_options _@param_ `duration_complete_options` *
      * * `duration` — A string or number determining how long the animation will run.
      * * `complete` — A function to call once the animation is complete, called once per matched element.
      * * `options` — A map of additional options to pass to the method. * @see \`{@link https://api.jquery.com/show/ }\` * @since 1.0 * @example ​ ````Animates all hidden paragraphs to show slowly, completing the animation within 600 milliseconds. ```html show demo

      Hello 2

      ​ ``` */ show(duration_complete_options?: JQuery.Duration | ((this: TElement) => void) | JQuery.EffectsOptions): this; /** * Get the siblings of each element in the set of matched elements, optionally filtered by a selector. * @param selector A string containing a selector expression to match elements against. * @see \`{@link https://api.jquery.com/siblings/ }\` * @since 1.0 * @example ​ ````Find the unique siblings of all yellow li elements in the 3 lists (including other yellow li elements if appropriate). ```html siblings demo
      • One
      • Two
      • Three
      • Four
      • Five
      • Six
      • Seven
      • Eight
      • Nine
      • Ten
      • Eleven

      Unique siblings:

      ​ ``` * @example ​ ````Find all siblings with a class "selected" of each div. ```html siblings demo
      Hello

      Hello Again

      And Again

      ​ ``` */ siblings(selector?: JQuery.Selector): this; /** * Reduce the set of matched elements to a subset specified by a range of indices. * @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. * @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. * @see \`{@link https://api.jquery.com/slice/ }\` * @since 1.1.4 * @example ​ ````Turns divs yellow based on a random slice. ```html slice demo

      Click the button!

      ​ ``` * @example ​ ````Selects all paragraphs, then slices the selection to include only the first element. ```javascript $( "p" ).slice( 0, 1 ).wrapInner( "" ); ``` * @example ​ ````Selects all paragraphs, then slices the selection to include only the first and second element. ```javascript $( "p" ).slice( 0, 2 ).wrapInner( "" ); ``` * @example ​ ````Selects all paragraphs, then slices the selection to include only the second element. ```javascript $( "p" ).slice( 1, 2 ).wrapInner( "" ); ``` * @example ​ ````Selects all paragraphs, then slices the selection to include only the second and third element. ```javascript $( "p" ).slice( 1 ).wrapInner( "" ); ``` * @example ​ ````Selects all paragraphs, then slices the selection to include only the third element. ```javascript $( "p" ).slice( -1 ).wrapInner( "" ); ``` */ slice(start: number, end?: number): this; /** * Display the matched elements with a sliding motion. * @param duration A string or number determining how long the animation will run. * @param easing A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/slideDown/ }\` * @since 1.4.3 */ slideDown(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; /** * Display the matched elements with a sliding motion. * @param duration_easing _@param_ `duration_easing` *
      * * `duration` — A string or number determining how long the animation will run.
      * * `easing` — A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/slideDown/ }\` * @since 1.0 * @since 1.4.3 * @example ​ ````Animates all inputs to slide down, completing the animation within 1000 milliseconds. Once the animation is done, the input look is changed especially if it is the middle input which gets the focus. ```html slideDown demo
      Push!
      ​ ``` */ slideDown(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; /** * Display the matched elements with a sliding motion. * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` *
      * * `duration` — A string or number determining how long the animation will run.
      * * `easing` — A string indicating which easing function to use for the transition.
      * * `complete` — A function to call once the animation is complete, called once per matched element.
      * * `options` — A map of additional options to pass to the method. * @see \`{@link https://api.jquery.com/slideDown/ }\` * @since 1.0 * @since 1.4.3 * @example ​ ````Animates all divs to slide down and show themselves over 600 milliseconds. ```html slideDown demo ​ Click me!
      ​ ``` */ slideDown(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; /** * Display or hide the matched elements with a sliding motion. * @param duration A string or number determining how long the animation will run. * @param easing A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/slideToggle/ }\` * @since 1.4.3 */ slideToggle(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; /** * Display or hide the matched elements with a sliding motion. * @param duration_easing _@param_ `duration_easing` *
      * * `duration` — A string or number determining how long the animation will run.
      * * `easing` — A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/slideToggle/ }\` * @since 1.0 * @since 1.4.3 * @example ​ ````Animates divs between dividers with a toggle that makes some appear and some disappear. ```html slideToggle demo

      There have been 0 toggled divs.

      ​ ``` */ slideToggle(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; /** * Display or hide the matched elements with a sliding motion. * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` *
      * * `duration` — A string or number determining how long the animation will run.
      * * `easing` — A string indicating which easing function to use for the transition.
      * * `complete` — A function to call once the animation is complete, called once per matched element.
      * * `options` — A map of additional options to pass to the method. * @see \`{@link https://api.jquery.com/slideToggle/ }\` * @since 1.0 * @since 1.4.3 * @example ​ ````Animates all paragraphs to slide up or down, completing the animation within 600 milliseconds. ```html slideToggle demo

      This is the paragraph to end all paragraphs. You should feel lucky to have seen such a paragraph in your life. Congratulations!

      ​ ``` */ slideToggle(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; /** * Hide the matched elements with a sliding motion. * @param duration A string or number determining how long the animation will run. * @param easing A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/slideUp/ }\` * @since 1.4.3 */ slideUp(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; /** * Hide the matched elements with a sliding motion. * @param duration_easing _@param_ `duration_easing` *
      * * `duration` — A string or number determining how long the animation will run.
      * * `easing` — A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/slideUp/ }\` * @since 1.0 * @since 1.4.3 * @example ​ ````Animates the parent paragraph to slide up, completing the animation within 200 milliseconds. Once the animation is done, it displays an alert. ```html slideUp demo
      ​ ``` */ slideUp(duration_easing: JQuery.Duration | string, complete: (this: TElement) => void): this; /** * Hide the matched elements with a sliding motion. * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` *
      * * `duration` — A string or number determining how long the animation will run.
      * * `easing` — A string indicating which easing function to use for the transition.
      * * `complete` — A function to call once the animation is complete, called once per matched element.
      * * `options` — A map of additional options to pass to the method. * @see \`{@link https://api.jquery.com/slideUp/ }\` * @since 1.0 * @since 1.4.3 * @example ​ ````Animates all divs to slide up, completing the animation within 400 milliseconds. ```html slideUp demo ​ Click me!
      ​ ``` */ slideUp(duration_easing_complete_options?: JQuery.Duration | string | ((this: TElement) => void) | JQuery.EffectsOptions): this; /** * Stop the currently-running animation on the matched elements. * @param queue The name of the queue in which to stop animations. * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false. * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false. * @see \`{@link https://api.jquery.com/stop/ }\` * @since 1.7 */ stop(queue: string, clearQueue?: boolean, jumpToEnd?: boolean): this; /** * Stop the currently-running animation on the matched elements. * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false. * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false. * @see \`{@link https://api.jquery.com/stop/ }\` * @since 1.2 * @example ​ ````Click the Go button once to start the animation, then click the STOP button to stop it where it's currently positioned. Another option is to click several buttons to queue them up and see that stop just kills the currently playing one. ```html stop demo
      ​ ``` * @example ​ ````Click the slideToggle button to start the animation, then click again before the animation is completed. The animation will toggle the other direction from the saved starting point. ```html stop demo
      ​ ``` */ stop(clearQueue?: boolean, jumpToEnd?: boolean): this; /** * Bind an event handler to the "submit" JavaScript event, or trigger that event on an element. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/submit/ }\` * @since 1.4.3 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. */ submit(eventData: TData, handler: JQuery.TypeEventHandler): this; /** * Bind an event handler to the "submit" JavaScript event, or trigger that event on an element. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/submit/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.3. Use \`{@link on }\` or \`{@link trigger }\`. * * **Cause**: The `.on()` and `.trigger()` methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu. * * **Solution**: Instead of `.click(fn)` use `.on("click", fn)`. Instead of `.click()` use `.trigger("click")`. * @example ​ ````If you'd like to prevent forms from being submitted unless a flag variable is set, try: ```html submit demo

      Type 'correct' to validate.

      ​ ``` * @example ​ ````If you'd like to prevent forms from being submitted unless a flag variable is set, try: ```javascript $( "form" ).submit(function() { return this.some_flag_variable; }); ``` * @example ​ ````To trigger the submit event on the first form on the page, try: ```javascript $( "form:first" ).submit(); ``` */ submit(handler?: JQuery.TypeEventHandler | false): this; /** * Set the content of each element in the set of matched elements to the specified text. * @param text_function _@param_ `text_function` *
      * * `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.
      * * `function` — 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. * @see \`{@link https://api.jquery.com/text/ }\` * @since 1.0 * @since 1.4 * @example ​ ````Add text to the paragraph (notice the bold tag is escaped). ```html text demo

      Test Paragraph.

      ​ ``` */ text(text_function: string | number | boolean | ((this: TElement, index: number, text: string) => string | number | boolean)): this; /** * Get the combined text contents of each element in the set of matched elements, including their descendants. * @see \`{@link https://api.jquery.com/text/ }\` * @since 1.0 * @example ​ ````Find the text in the first paragraph (stripping out the html), then set the html of the last paragraph to show it is just text (the red bold is gone). ```html text demo

      Test Paragraph.

      ​ ``` */ text(): string; /** * Retrieve all the elements contained in the jQuery set, as an array. * @see \`{@link https://api.jquery.com/toArray/ }\` * @since 1.4 * @example ​ ````Select all divs in the document and return the DOM Elements as an Array; then use the built-in reverse() method to reverse that array. ```html toArray demo ​ Reversed -
      One
      Two
      Three
      ​ ``` */ toArray(): TElement[]; /** * Display or hide the matched elements. * @param duration A string or number determining how long the animation will run. * @param easing A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/toggle/ }\` * @since 1.4.3 */ toggle(duration: JQuery.Duration, easing: string, complete?: (this: TElement) => void): this; /** * Display or hide the matched elements. * @param duration A string or number determining how long the animation will run. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/toggle/ }\` * @since 1.0 */ toggle(duration: JQuery.Duration, complete: (this: TElement) => void): this; /** * Display or hide the matched elements. * @param duration_complete_options_display _@param_ `duration_complete_options_display` *
      * * `duration` — A string or number determining how long the animation will run.
      * * `complete` — A function to call once the animation is complete, called once per matched element.
      * * `options` — A map of additional options to pass to the method.
      * * `display` — Use true to show the element or false to hide it. * @see \`{@link https://api.jquery.com/toggle/ }\` * @since 1.0 * @since 1.3 * @example ​ ````Toggles all paragraphs. ```html toggle demo

      Hello

      Good Bye

      ​ ``` * @example ​ ````Animates all paragraphs to be shown if they are hidden and hidden if they are visible, completing the animation within 600 milliseconds. ```html toggle demo

      Hiya

      Such interesting text, eh?

      ​ ``` * @example ​ ````Shows all paragraphs, then hides them all, back and forth. ```html toggle demo

      Hello

      Good Bye

      ​ ``` */ toggle(duration_complete_options_display?: JQuery.Duration | ((this: TElement) => void) | JQuery.EffectsOptions | boolean): this; /** * 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 state argument. * @param className_function _@param_ `className_function` *
      * * `className` — One or more class names (separated by spaces) to be toggled for each element in the matched set.
      * * `function` — 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 state as arguments. * @param state A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed. * @see \`{@link https://api.jquery.com/toggleClass/ }\` * @since 1.0 * @since 1.3 * @since 1.4 * @since 3.3 * @example ​ ````Toggle the class 'highlight' when a paragraph is clicked. ```html toggleClass demo

      Click to toggle

      highlight

      on these

      paragraphs

      ​ ``` * @example ​ ````Add the "highlight" class to the clicked paragraph on every third click of that paragraph, remove it every first and second click. ```html toggleClass demo

      Click to toggle (clicks: 0)

      highlight (clicks: 0)

      on these (clicks: 0)

      paragraphs (clicks: 0)

      ​ ``` * @example ​ ````Toggle the class name(s) indicated on the buttons for each div. ```html toggleClass demo
      reset
      ​ ``` */ toggleClass(className_function: JQuery.TypeOrArray | ((this: TElement, index: number, className: string, state: TState) => string), state?: TState): this; /** * 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 state argument. * @param state A boolean value to determine whether the class should be added or removed. * @see \`{@link https://api.jquery.com/toggleClass/ }\` * @since 1.4 * @deprecated ​ Deprecated since 3.0. See \`{@link https://github.com/jquery/jquery/pull/2618 }\`. * * **Cause**: Calling `.toggleClass()` with no arguments, or with a single Boolean `true` or `false` argument, has been deprecated. Its behavior was poorly documented, but essentially the method saved away the current class value in a data item when the class was removed and restored the saved value when it was toggled back. If you do not believe you are specificially trying to use this form of the method, it is possible you are accidentally doing so via an inadvertent undefined value, as `.toggleClass( undefined )` toggles all classes. * * **Solution**: If this functionality is still needed, save the current full `.attr( "class" )` value in a data item and restore it when required. */ toggleClass(state?: boolean): this; /** * Execute all handlers and behaviors attached to the matched elements for the given event type. * @param eventType_event _@param_ `eventType_event` *
      * * `eventType` — A string containing a JavaScript event type, such as `click` or `submit`.
      * * `event` — A \`{@link https://api.jquery.com/category/events/event-object/ jQuery.Event}\` object. * @param extraParameters Additional parameters to pass along to the event handler. * @see \`{@link https://api.jquery.com/trigger/ }\` * @since 1.0 * @since 1.3 * @example ​ ````Clicks to button #2 also trigger a click for button #1. ```html trigger demo
      0 button #1 clicks.
      0 button #2 clicks.
      ​ ``` * @example ​ ````To submit the first form without using the submit() function, try: ```javascript $( "form:first" ).trigger( "submit" ); ``` * @example ​ ````To submit the first form without using the submit() function, try: ```javascript var event = jQuery.Event( "submit" ); $( "form:first" ).trigger( event ); if ( event.isDefaultPrevented() ) { // Perform an action... } ``` * @example ​ ````To pass arbitrary data to an event: ```javascript $( "p" ) .click(function( event, a, b ) { // When a normal click fires, a and b are undefined // for a trigger like below a refers to "foo" and b refers to "bar" }) .trigger( "click", [ "foo", "bar" ] ); ``` * @example ​ ````To pass arbitrary data through an event object: ```javascript var event = jQuery.Event( "logged" ); event.user = "foo"; event.pass = "bar"; $( "body" ).trigger( event ); ``` * @example ​ ````Alternative way to pass data through an event object: ```javascript $( "body" ).trigger({ type:"logged", user:"foo", pass:"bar" }); ``` */ trigger(eventType_event: string | JQuery.Event, extraParameters?: any[] | JQuery.PlainObject | string | number | boolean): this; /** * Execute all handlers attached to an element for an event. * @param eventType_event _@param_ `eventType_event` *
      * * `eventType` — A string containing a JavaScript event type, such as `click` or `submit`.
      * * `event` — A \`{@link https://api.jquery.com/category/events/event-object/ jQuery.Event}\` object. * @param extraParameters Additional parameters to pass along to the event handler. * @see \`{@link https://api.jquery.com/triggerHandler/ }\` * @since 1.2 * @since 1.3 * @example ​ ````If you called .triggerHandler() on a focus event - the browser's default focus action would not be triggered, only the event handlers bound to the focus event. ```html triggerHandler demo

      ​ ``` */ triggerHandler(eventType_event: string | JQuery.Event, extraParameters?: any[] | JQuery.PlainObject | string | number | boolean): any; /** * Remove a previously-attached event handler from the elements. * @param event A string containing one or more DOM event types, such as "click" or "submit," or custom event names. * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/unbind/ }\` * @since 1.0 * @since 1.4.3 * @deprecated ​ Deprecated since 3.0. Use \`{@link off }\`. * * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. * * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. * @example ​ ````Can bind and unbind events to the colored button. ```html unbind demo
      Click!
      ​ ``` * @example ​ ````To unbind just one previously bound handler, pass the function in as the second argument: ```javascript var foo = function() { // Code to handle some kind of event }; ​ $( "p" ).bind( "click", foo ); // ... Now foo will be called when paragraphs are clicked ... ​ $( "p" ).unbind( "click", foo ); // ... foo will no longer be called. ``` */ unbind( event: TType, handler: JQuery.TypeEventHandler | false ): this; /** * Remove a previously-attached event handler from the elements. * @param event A string containing one or more DOM event types, such as "click" or "submit," or custom event names. * A jQuery.Event object. * @see \`{@link https://api.jquery.com/unbind/ }\` * @since 1.0 * @deprecated ​ Deprecated since 3.0. Use \`{@link off }\`. * * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. * * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. * @example ​ ````To unbind all events from all paragraphs, write: ```javascript $( "p" ).unbind(); ``` * @example ​ ````To unbind all click events from all paragraphs, write: ```javascript $( "p" ).unbind( "click" ); ``` */ unbind(event?: string | JQuery.TriggeredEvent): this; /** * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. * @param selector A selector which will be used to filter the event results. * @param eventType A string containing a JavaScript event type, such as "click" or "keydown" * @param handler A function to execute each time the event is triggered. * @see \`{@link https://api.jquery.com/undelegate/ }\` * @since 1.4.2 * @deprecated ​ Deprecated since 3.0. Use \`{@link off }\`. * * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. * * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. * @example ​ ````Can bind and unbind events to the colored button. ```html undelegate demo
      Click!
      ​ ``` * @example ​ ````To undelegate just one previously bound handler, pass the function in as the third argument: ```javascript var foo = function () { // Code to handle some kind of event }; ​ // ... Now foo will be called when paragraphs are clicked ... $( "body" ).delegate( "p", "click", foo ); ​ // ... foo will no longer be called. $( "body" ).undelegate( "p", "click", foo ); ``` */ undelegate( selector: JQuery.Selector, eventType: TType, handler: JQuery.TypeEventHandler | false ): this; /** * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. * @param selector A selector which will be used to filter the event results. * @param eventType_events _@param_ `eventType_events` *
      * * `eventType` — A string containing a JavaScript event type, such as "click" or "keydown"
      * * `events` — An object of one or more event types and previously bound functions to unbind from them. * @see \`{@link https://api.jquery.com/undelegate/ }\` * @since 1.4.2 * @since 1.4.3 * @deprecated ​ Deprecated since 3.0. Use \`{@link off }\`. * * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. * * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. */ undelegate(selector: JQuery.Selector, eventType_events: string | JQuery.TypeEventHandlers): this; /** * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. * @param namespace A selector which will be used to filter the event results. * @see \`{@link https://api.jquery.com/undelegate/ }\` * @since 1.4.2 * @since 1.6 * @deprecated ​ Deprecated since 3.0. Use \`{@link off }\`. * * **Cause**: These event binding methods have been deprecated in favor of the `.on()` and `.off()` methods which can handle both delegated and direct event binding. Although the older methods are still present in jQuery 3.0, they may be removed as early as the next major-version update. * * **Solution**: Change the method call to use `.on()` or `.off()`, the documentation for the old methods include specific instructions. In general, the `.bind()` and `.unbind()` methods can be renamed directly to `.on()` and `.off()` respectively since the argument orders are identical. * @example ​ ````To unbind all delegated events from all paragraphs, write: ```javascript $( "p" ).undelegate(); ``` * @example ​ ````To unbind all delegated click events from all paragraphs, write: ```javascript $( "p" ).undelegate( "click" ); ``` * @example ​ ````To unbind all delegated events by their namespace: ```javascript var foo = function() { // Code to handle some kind of event }; ​ // Delegate events under the ".whatever" namespace $( "form" ).delegate( ":button", "click.whatever", foo ); ​ $( "form" ).delegate( "input[type='text'] ", "keypress.whatever", foo ); ​ // Unbind all events delegated under the ".whatever" namespace $( "form" ).undelegate( ".whatever" ); ``` */ undelegate(namespace?: string): this; /** * Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place. * @param selector A selector to check the parent element against. If an element's parent does not match the selector, * the element won't be unwrapped. * @see \`{@link https://api.jquery.com/unwrap/ }\` * @since 1.4 * @since 3.0 * @example ​ ````Wrap/unwrap a div around each of the paragraphs. ```html unwrap demo

      Hello

      cruel

      World

      ​ ``` */ unwrap(selector?: string): this; /** * Set the value of each element in the set of matched elements. * @param value_function _@param_ `value_function` *
      * * `value` — A string of text, a number, or an array of strings corresponding to the value of each matched * element to set as selected/checked.
      * * `function` — 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. * @see \`{@link https://api.jquery.com/val/ }\` * @since 1.0 * @since 1.4 * @example ​ ````Set the value of an input box. ```html val demo
      ​ ``` * @example ​ ````Use the function argument to modify the value of an input box. ```html val demo

      Type something and then click or tab out of the input.

      ​ ``` * @example ​ ````Set a single select, a multiple select, checkboxes and a radio button . ```html val demo
      check1 check2 radio1 radio2 ​ ​ ``` */ val(value_function: string | number | string[] | ((this: TElement, index: number, value: string) => string)): this; /** * Get the current value of the first element in the set of matched elements. * @see \`{@link https://api.jquery.com/val/ }\` * @since 1.0 * @example ​ ````Get the single value from a single select and an array of values from a multiple select and display their values. ```html val demo

      ​ ``` * @example ​ ````Find the value of an input box. ```html val demo

      ​ ``` */ val(): string | number | string[] | undefined; /** * Set the CSS width of each element in the set of matched elements. * @param value_function _@param_ `value_function` *
      * * `value` — An integer representing the number of pixels, or an integer along with an optional unit of measure * appended (as a string).
      * * `function` — 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. * @see \`{@link https://api.jquery.com/width/ }\` * @since 1.0 * @since 1.4.1 * @example ​ ````Change the width of each div the first time it is clicked (and change its color). ```html width demo
      d
      d
      d
      d
      d
      ​ ``` */ width(value_function: string | number | ((this: TElement, index: number, value: number) => string | number)): this; /** * Get the current computed width for the first element in the set of matched elements. * @see \`{@link https://api.jquery.com/width/ }\` * @since 1.0 * @example ​ ````Show various widths. Note the values are from the iframe so might be smaller than you expected. The yellow highlight shows the iframe body. ```html width demo
       

      Sample paragraph to test width

      ​ ``` */ width(): number | undefined; /** * Wrap an HTML structure around each element in the set of matched elements. * @param wrappingElement_function _@param_ `wrappingElement_function` *
      * * `wrappingElement` — A selector, element, HTML string, or jQuery object specifying the structure to wrap around the * matched elements. When you pass a jQuery collection containing more than one element, or a selector * matching more than one element, the first element will be used.
      * * `function` — 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. * @see \`{@link https://api.jquery.com/wrap/ }\` * @since 1.0 * @since 1.4 * @example ​ ````Wrap a new div around all of the paragraphs. ```html wrap demo

      Hello

      cruel

      World

      ​ ``` * @example ​ ````Wraps a newly created tree of objects around the spans. Notice anything in between the spans gets left out like the <strong> (red text) in this example. Even the white space between spans is left out. Click View Source to see the original html.> ```html wrap demo Span Text What about me? Another One ​ ``` * @example ​ ````Wrap a new div around all of the paragraphs. ```html wrap demo

      Hello

      cruel

      World

      ​ ``` * @example ​ ````Wrap a jQuery object double depth div around all of the paragraphs. Notice it doesn't move the object but just clones it to wrap around its target. ```html wrap demo

      Hello

      cruel

      World

      ​ ``` */ wrap(wrappingElement_function: JQuery.Selector | JQuery.htmlString | Element | JQuery | ((this: TElement, index: number) => string | JQuery)): this; /** * Wrap an HTML structure around all elements in the set of matched elements. * @param wrappingElement_function _@param_ `wrappingElement_function` *
      * * `wrappingElement` — A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
      * * `function` — A callback function returning the HTML content or jQuery object to wrap around all the matched * elements. Within the function, `this` refers to the first element in the set. **Prior to jQuery * 3.0**, the callback was incorrectly called for every element in the set and received the index * position of the element in the set as an argument. * @see \`{@link https://api.jquery.com/wrapAll/ }\` * @since 1.2 * @since 1.4 * @example ​ ````Wrap a new div around all of the paragraphs. ```html wrapAll demo

      Hello

      cruel

      World

      ​ ``` * @example ​ ````Wraps a newly created tree of objects around the spans. Notice anything in between the spans gets left out like the <strong> (red text) in this example. Even the white space between spans is left out. Click View Source to see the original html. ```html wrapAll demo Span Text What about me? Another One ​ ``` * @example ​ ````Wrap a new div around all of the paragraphs. ```html wrapAll demo

      Hello

      cruel

      World

      ​ ``` * @example ​ ````Wrap a jQuery object double depth div around all of the paragraphs. Notice it doesn't move the object but just clones it to wrap around its target. ```html wrapAll demo

      Hello

      cruel

      World

      ​ ``` */ wrapAll(wrappingElement_function: JQuery.Selector | JQuery.htmlString | Element | JQuery | ((this: TElement) => string | JQuery)): this; /** * Wrap an HTML structure around the content of each element in the set of matched elements. * @param wrappingElement_function _@param_ `wrappingElement_function` *
      * * `wrappingElement` — An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap * around the content of the matched elements.
      * * `function` — 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. * @see \`{@link https://api.jquery.com/wrapInner/ }\` * @since 1.2 * @since 1.4 * @example ​ ````Selects all paragraphs and wraps a bold tag around each of its contents. ```html wrapInner demo

      Hello

      cruel

      World

      ​ ``` * @example ​ ````Wraps a newly created tree of objects around the inside of the body. ```html wrapInner demo ​ Plain old text, or is it? ​ ​ ``` * @example ​ ````Selects all paragraphs and wraps a bold tag around each of its contents. ```html wrapInner demo

      Hello

      cruel

      World

      ​ ``` * @example ​ ````Selects all paragraphs and wraps a jQuery object around each of its contents. ```html wrapInner demo

      Hello

      cruel

      World

      ​ ``` */ wrapInner(wrappingElement_function: JQuery.Selector | JQuery.htmlString | Element | JQuery | ((this: TElement, index: number) => string | JQuery | Element)): this; [n: number]: TElement; }