Module JQuery<TElement>

Type parameters

  • TElement: Node

Indexable

[n: number]: TElement

Index

Modules

Enumerations

Interfaces

Type aliases

Properties

Methods

Type aliases

Duration

Duration: number | "fast" | "slow"

Node

Node: Element | Text | Comment

Queue

Queue: object & Array<QueueFunction<TElement>>

Selector

Selector: string

A selector is used in jQuery to select DOM elements from a DOM document. That document is, in most cases, the DOM document present in all browsers, but can also be an XML document received via Ajax.

TypeOrArray

TypeOrArray: T | T[]

htmlString

htmlString: string

A string is designated htmlString in jQuery documentation when it is used to represent one or more DOM elements, typically to be created and inserted in the document. When passed as an argument of the jQuery() function, the string is identified as HTML if it starts with <tag ... >) and is parsed as such until the final > character. Prior to jQuery 1.9, a string was considered to be HTML if it contained <tag ... > anywhere within the string.

Properties

jquery

jquery: string

A string containing the jQuery version number.

see

https://api.jquery.com/jquery/

since

1.0

length

length: number

The number of elements in the jQuery object.

see

https://api.jquery.com/length/

since

1.0

Methods

__@iterator

  • __@iterator(): Iterator<TElement>
  • Returns Iterator<TElement>

add

  • Create a new jQuery object with elements added to the set of matched elements.

    see

    https://api.jquery.com/add/

    since

    1.4

    Parameters

    • selector: Selector

      A string representing a selector expression to find additional elements to add to the set of matched elements.

    • context: Element

      The point in the document at which the selector should begin matching; similar to the context argument of the $(selector, context) method.

    Returns this

  • Create a new jQuery object with elements added to the set of matched elements.

    see

    https://api.jquery.com/add/

    since

    1.0

    since

    1.3.2

    Parameters

    • selector: Selector | TypeOrArray<Element> | htmlString | JQuery

      A string representing a selector expression to find additional elements to add to the set of matched elements. One or more elements to add to the set of matched elements. An HTML fragment to add to the set of matched elements. An existing jQuery object to add to the set of matched elements.

    Returns this

addBack

  • Add the previous set of elements on the stack to the current set, optionally filtered by a selector.

    see

    https://api.jquery.com/addBack/

    since

    1.8

    Parameters

    • Optional selector: Selector

      A string containing a selector expression to match the current set of elements against.

    Returns this

addClass

  • addClass(className: string | function): this
  • Adds the specified class(es) to each element in the set of matched elements.

    see

    https://api.jquery.com/addClass/

    since

    1.0

    since

    1.4

    Parameters

    • className: string | function

      One or more space-separated classes to be added to the class attribute of each matched element. 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.

    Returns this

after

  • Insert content, specified by the parameter, after each element in the set of matched elements.

    see

    https://api.jquery.com/after/

    since

    1.0

    Parameters

    • Rest ...contents: Array<htmlString | TypeOrArray<Node | JQuery<Node>>>

      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.

    Returns this

  • Insert content, specified by the parameter, after each element in the set of matched elements.

    see

    https://api.jquery.com/after/

    since

    1.4

    since

    1.10

    Parameters

    • fn: 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 and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.

    Returns this

ajaxComplete

  • ajaxComplete(handler: function): this
  • Register a handler to be called when Ajax requests complete. This is an AjaxEvent.

    see

    https://api.jquery.com/ajaxComplete/

    since

    1.0

    Parameters

    • handler: function

      The function to be invoked.

    Returns this

ajaxError

  • ajaxError(handler: function): this
  • Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event.

    see

    https://api.jquery.com/ajaxError/

    since

    1.0

    Parameters

    • handler: function

      The function to be invoked.

        • (this: Document, event: Event<Document>, jqXHR: jqXHR, ajaxSettings: AjaxSettings, thrownError: string): void | false
        • Parameters

          Returns void | false

    Returns this

ajaxSend

  • ajaxSend(handler: function): this
  • Attach a function to be executed before an Ajax request is sent. This is an Ajax Event.

    see

    https://api.jquery.com/ajaxSend/

    since

    1.0

    Parameters

    • handler: function

      The function to be invoked.

    Returns this

ajaxStart

  • ajaxStart(handler: function): this
  • Register a handler to be called when the first Ajax request begins. This is an Ajax Event.

    see

    https://api.jquery.com/ajaxStart/

    since

    1.0

    Parameters

    • handler: function

      The function to be invoked.

        • (this: Document): void | false
        • Parameters

          • this: Document

          Returns void | false

    Returns this

ajaxStop

  • ajaxStop(handler: function): this
  • Register a handler to be called when all Ajax requests have completed. This is an Ajax Event.

    see

    https://api.jquery.com/ajaxStop/

    since

    1.0

    Parameters

    • handler: function

      The function to be invoked.

        • (this: Document): void | false
        • Parameters

          • this: Document

          Returns void | false

    Returns this

ajaxSuccess

  • ajaxSuccess(handler: function): this

animate

  • Perform a custom animation of a set of CSS properties.

    see

    https://api.jquery.com/animate/

    since

    1.0

    Parameters

    • properties: PlainObject

      An object of CSS properties and values that the animation will move toward.

    • duration: Duration

      A string or number determining how long the animation will run.

    • easing: string

      A string indicating which easing function to use for the transition.

    • Optional complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Perform a custom animation of a set of CSS properties.

    see

    https://api.jquery.com/animate/

    since

    1.0

    Parameters

    • properties: PlainObject

      An object of CSS properties and values that the animation will move toward.

    • duration_easing: Duration | string

      A string or number determining how long the animation will run. A string indicating which easing function to use for the transition.

    • Optional complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Perform a custom animation of a set of CSS properties.

    see

    https://api.jquery.com/animate/

    since

    1.0

    Parameters

    • properties: PlainObject

      An object of CSS properties and values that the animation will move toward.

    • options: EffectsOptions<TElement>

      A map of additional options to pass to the method.

    Returns this

  • Perform a custom animation of a set of CSS properties.

    see

    https://api.jquery.com/animate/

    since

    1.0

    Parameters

    • properties: PlainObject

      An object of CSS properties and values that the animation will move toward.

    • Optional complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

append

  • Insert content, specified by the parameter, to the end of each element in the set of matched elements.

    see

    https://api.jquery.com/append/

    since

    1.0

    Parameters

    • Rest ...contents: Array<htmlString | TypeOrArray<Node | JQuery<Node>>>

      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.

    Returns this

  • Insert content, specified by the parameter, to the end of each element in the set of matched elements.

    see

    https://api.jquery.com/append/

    since

    1.4

    Parameters

    • fn: function

      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.

    Returns this

appendTo

  • Insert every element in the set of matched elements to the end of the target.

    see

    https://api.jquery.com/appendTo/

    since

    1.0

    Parameters

    • target: Selector | htmlString | TypeOrArray<Element> | JQuery

      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.

    Returns this

attr

  • attr(attributeName: string, value: string | number | null | function): this
  • attr(attributes: PlainObject): this
  • attr(attributeName: string): string | undefined
  • Set one or more attributes for the set of matched elements.

    see

    https://api.jquery.com/attr/

    since

    1.0

    since

    1.1

    Parameters

    • attributeName: string

      The name of the attribute to set.

    • value: string | number | null | function

      A value to set for the attribute. If null, the specified attribute will be removed (as in .removeAttr()). 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.

    Returns this

  • Set one or more attributes for the set of matched elements.

    see

    https://api.jquery.com/attr/

    since

    1.0

    Parameters

    • attributes: PlainObject

      An object of attribute-value pairs to set.

    Returns this

  • Get the value of an attribute for the first element in the set of matched elements.

    see

    https://api.jquery.com/attr/

    since

    1.0

    Parameters

    • attributeName: string

      The name of the attribute to get.

    Returns string | undefined

before

  • Insert content, specified by the parameter, before each element in the set of matched elements.

    see

    https://api.jquery.com/before/

    since

    1.0

    Parameters

    • Rest ...contents: Array<htmlString | TypeOrArray<Node | JQuery<Node>>>

      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.

    Returns this

  • Insert content, specified by the parameter, before each element in the set of matched elements.

    see

    https://api.jquery.com/before/

    since

    1.4

    since

    1.10

    Parameters

    • fn: 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 and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.

    Returns this

bind

  • Attach a handler to an event for the elements.

    see

    https://api.jquery.com/bind/

    since

    1.0

    since

    1.4.3

    deprecated

    3.0

    Type parameters

    • TData

    Parameters

    • eventType: string

      A string containing one or more DOM event types, such as "click" or "submit," or custom event names.

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Attach a handler to an event for the elements.

    see

    https://api.jquery.com/bind/

    since

    1.0

    since

    1.4.3

    deprecated

    3.0

    Parameters

    • eventType: string

      A string containing one or more DOM event types, such as "click" or "submit," or custom event names.

    • handler: EventHandler<TElement> | EventHandlerBase<any, Event<TElement>> | false | null | undefined

      A function to execute each time the event is triggered. Setting the second argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling.

    Returns this

  • Attach a handler to an event for the elements.

    see

    https://api.jquery.com/bind/

    since

    1.4

    deprecated

    3.0

    Parameters

    Returns this

blur

  • Bind an event handler to the "blur" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/blur/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "blur" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/blur/

    since

    1.0

    Parameters

    Returns this

change

  • Bind an event handler to the "change" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/change/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "change" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/change/

    since

    1.0

    Parameters

    Returns this

children

  • Get the children of each element in the set of matched elements, optionally filtered by a selector.

    see

    https://api.jquery.com/children/

    since

    1.0

    Parameters

    • Optional selector: Selector

      A string containing a selector expression to match elements against.

    Returns this

clearQueue

  • clearQueue(queueName?: string): this
  • Remove from the queue all items that have not yet been run.

    see

    https://api.jquery.com/clearQueue/

    since

    1.4

    Parameters

    • Optional queueName: string

      A string containing the name of the queue. Defaults to fx, the standard effects queue.

    Returns this

click

  • Bind an event handler to the "click" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/click/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "click" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/click/

    since

    1.0

    Parameters

    Returns this

clone

  • clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): this
  • Create a deep copy of the set of matched elements.

    see

    https://api.jquery.com/clone/

    since

    1.0

    since

    1.5

    Parameters

    • Optional withDataAndEvents: boolean

      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.

    • Optional deepWithDataAndEvents: boolean

      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).

    Returns this

closest

  • closest(selector: Selector, context: Element): this
  • closest(selector: Selector | Element | JQuery): 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.

    see

    https://api.jquery.com/closest/

    since

    1.4

    Parameters

    • selector: Selector

      A string containing a selector expression to match elements against.

    • context: Element

      A DOM element within which a matching element may be found.

    Returns 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.

    see

    https://api.jquery.com/closest/

    since

    1.3

    since

    1.6

    Parameters

    • selector: Selector | Element | JQuery

      A string containing a selector expression to match elements against. A jQuery object to match elements against. An element to match elements against.

    Returns this

contents

  • contents(): JQuery<TElement | Text | Comment>
  • Get the children of each element in the set of matched elements, including text and comment nodes.

    see

    https://api.jquery.com/contents/

    since

    1.2

    Returns JQuery<TElement | Text | Comment>

contextmenu

  • Bind an event handler to the "contextmenu" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/contextmenu/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "contextmenu" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/contextmenu/

    since

    1.0

    Parameters

    Returns this

css

  • css(propertyName: string, value: string | number | function): this
  • css(properties: PlainObject<string | number | function>): this
  • css(propertyName: string): string
  • css(propertyNames: string[]): PlainObject<string>
  • Set one or more CSS properties for the set of matched elements.

    see

    https://api.jquery.com/css/

    since

    1.0

    since

    1.4

    Parameters

    • propertyName: string

      A CSS property name.

    • value: string | number | function

      A value to set for the property. 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.

    Returns this

  • Set one or more CSS properties for the set of matched elements.

    see

    https://api.jquery.com/css/

    since

    1.0

    Parameters

    • properties: PlainObject<string | number | function>

      An object of property-value pairs to set.

    Returns this

  • Get the computed style properties for the first element in the set of matched elements.

    see

    https://api.jquery.com/css/

    since

    1.0

    Parameters

    • propertyName: string

      A CSS property. An array of one or more CSS properties.

    Returns string

  • Get the computed style properties for the first element in the set of matched elements.

    see

    https://api.jquery.com/css/

    since

    1.9

    Parameters

    • propertyNames: string[]

      An array of one or more CSS properties.

    Returns PlainObject<string>

data

  • data(key: string, undefined: undefined): any
  • data(key: string, value: any): this
  • data(obj: PlainObject): this
  • data(key: string): any
  • data(): PlainObject
  • 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

    https://api.jquery.com/data/

    since

    1.2.3

    Parameters

    • key: string

      Name of the data stored.

    • undefined: undefined

    Returns any

  • Store arbitrary data associated with the matched elements.

    see

    https://api.jquery.com/data/

    since

    1.2.3

    Parameters

    • key: string

      A string naming the piece of data to set.

    • value: any

      The new data value; this can be any Javascript type except undefined.

    Returns this

  • Store arbitrary data associated with the matched elements.

    see

    https://api.jquery.com/data/

    since

    1.4.3

    Parameters

    • obj: PlainObject

      An object of key-value pairs of data to update.

    Returns 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.

    see

    https://api.jquery.com/data/

    since

    1.2.3

    Parameters

    • key: string

      Name of the data stored.

    Returns 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

    https://api.jquery.com/data/

    since

    1.4

    Returns PlainObject

dblclick

  • Bind an event handler to the "dblclick" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/dblclick/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "dblclick" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/dblclick/

    since

    1.0

    Parameters

    Returns this

delay

  • delay(duration: Duration, queueName?: string): this
  • Set a timer to delay execution of subsequent items in the queue.

    see

    https://api.jquery.com/delay/

    since

    1.4

    Parameters

    • duration: Duration

      An integer indicating the number of milliseconds to delay execution of the next item in the queue.

    • Optional queueName: string

      A string containing the name of the queue. Defaults to fx, the standard effects queue.

    Returns this

delegate

  • 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.

    see

    https://api.jquery.com/delegate/

    since

    1.4.2

    deprecated

    3.0

    Type parameters

    • TData

    Parameters

    • selector: Selector

      A selector to filter the elements that trigger the event.

    • eventType: string

      A string containing one or more space-separated JavaScript event types, such as "click" or "keydown," or custom event names.

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns 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.

    see

    https://api.jquery.com/delegate/

    since

    1.4.2

    deprecated

    3.0

    Parameters

    • selector: Selector

      A selector to filter the elements that trigger the event.

    • eventType: string

      A string containing one or more space-separated JavaScript event types, such as "click" or "keydown," or custom event names.

    • handler: EventHandler<TElement> | EventHandlerBase<any, Event<TElement>> | false

      A function to execute each time the event is triggered.

    Returns 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.

    see

    https://api.jquery.com/delegate/

    since

    1.4.3

    deprecated

    3.0

    Parameters

    Returns this

dequeue

  • dequeue(queueName?: string): this
  • Execute the next function on the queue for the matched elements.

    see

    https://api.jquery.com/dequeue/

    since

    1.2

    Parameters

    • Optional queueName: string

      A string containing the name of the queue. Defaults to fx, the standard effects queue.

    Returns this

detach

  • Remove the set of matched elements from the DOM.

    see

    https://api.jquery.com/detach/

    since

    1.4

    Parameters

    • Optional selector: Selector

      A selector expression that filters the set of matched elements to be removed.

    Returns this

each

  • each(fn: function): this
  • Iterate over a jQuery object, executing a function for each matched element.

    see

    https://api.jquery.com/each/

    since

    1.0

    Parameters

    • fn: function

      A function to execute for each matched element.

        • (this: TElement, index: number, element: TElement): void | false
        • Parameters

          • this: TElement
          • index: number
          • element: TElement

          Returns void | false

    Returns this

empty

  • empty(): this

end

  • end(): this
  • End the most recent filtering operation in the current chain and return the set of matched elements to its previous state.

    see

    https://api.jquery.com/end/

    since

    1.0

    Returns this

eq

  • eq(index: number): this
  • Reduce the set of matched elements to the one at the specified index.

    see

    https://api.jquery.com/eq/

    since

    1.1.2

    since

    1.4

    Parameters

    • index: number

      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.

    Returns this

extend

  • extend(obj: object): this
  • Merge the contents of an object onto the jQuery prototype to provide new jQuery instance methods.

    see

    https://api.jquery.com/jQuery.fn.extend/

    since

    1.0

    Parameters

    • obj: object

      An object to merge onto the jQuery prototype.

    Returns this

fadeIn

  • fadeIn(duration: Duration, easing: string, complete?: function): this
  • fadeIn(duration_easing: Duration | string, complete: function): this
  • fadeIn(duration_easing_complete_options?: Duration | string | function | EffectsOptions<TElement>): this
  • Display the matched elements by fading them to opaque.

    see

    https://api.jquery.com/fadeIn/

    since

    1.4.3

    Parameters

    • duration: Duration

      A string or number determining how long the animation will run.

    • easing: string

      A string indicating which easing function to use for the transition.

    • Optional complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Display the matched elements by fading them to opaque.

    see

    https://api.jquery.com/fadeIn/

    since

    1.0

    since

    1.4.3

    Parameters

    • duration_easing: Duration | string

      A string or number determining how long the animation will run. A string indicating which easing function to use for the transition.

    • complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Display the matched elements by fading them to opaque.

    see

    https://api.jquery.com/fadeIn/

    since

    1.0

    since

    1.4.3

    Parameters

    • Optional duration_easing_complete_options: Duration | string | function | EffectsOptions<TElement>

      A string or number determining how long the animation will run. A string indicating which easing function to use for the transition. A function to call once the animation is complete, called once per matched element. A map of additional options to pass to the method.

    Returns this

fadeOut

  • fadeOut(duration: Duration, easing: string, complete?: function): this
  • fadeOut(duration_easing: Duration | string, complete: function): this
  • fadeOut(duration_easing_complete_options?: Duration | string | function | EffectsOptions<TElement>): this
  • Hide the matched elements by fading them to transparent.

    see

    https://api.jquery.com/fadeOut/

    since

    1.4.3

    Parameters

    • duration: Duration

      A string or number determining how long the animation will run.

    • easing: string

      A string indicating which easing function to use for the transition.

    • Optional complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Hide the matched elements by fading them to transparent.

    see

    https://api.jquery.com/fadeOut/

    since

    1.0

    since

    1.4.3

    Parameters

    • duration_easing: Duration | string

      A string or number determining how long the animation will run. A string indicating which easing function to use for the transition.

    • complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Hide the matched elements by fading them to transparent.

    see

    https://api.jquery.com/fadeOut/

    since

    1.0

    since

    1.4.3

    Parameters

    • Optional duration_easing_complete_options: Duration | string | function | EffectsOptions<TElement>

      A string or number determining how long the animation will run. A string indicating which easing function to use for the transition. A function to call once the animation is complete, called once per matched element. A map of additional options to pass to the method.

    Returns this

fadeTo

  • fadeTo(duration: Duration, opacity: number, easing: string, complete?: function): this
  • fadeTo(duration: Duration, opacity: number, complete?: function): this
  • Adjust the opacity of the matched elements.

    see

    https://api.jquery.com/fadeTo/

    since

    1.4.3

    Parameters

    • duration: Duration

      A string or number determining how long the animation will run.

    • opacity: number

      A number between 0 and 1 denoting the target opacity.

    • easing: string

      A string indicating which easing function to use for the transition.

    • Optional complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Adjust the opacity of the matched elements.

    see

    https://api.jquery.com/fadeTo/

    since

    1.0

    Parameters

    • duration: Duration

      A string or number determining how long the animation will run.

    • opacity: number

      A number between 0 and 1 denoting the target opacity.

    • Optional complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

fadeToggle

  • fadeToggle(duration: Duration, easing: string, complete?: function): this
  • fadeToggle(duration_easing: Duration | string, complete: function): this
  • fadeToggle(duration_easing_complete_options?: Duration | string | function | EffectsOptions<TElement>): this
  • Display or hide the matched elements by animating their opacity.

    see

    https://api.jquery.com/fadeToggle/

    since

    1.4.4

    Parameters

    • duration: Duration

      A string or number determining how long the animation will run.

    • easing: string

      A string indicating which easing function to use for the transition.

    • Optional complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Display or hide the matched elements by animating their opacity.

    see

    https://api.jquery.com/fadeToggle/

    since

    1.0

    since

    1.4.3

    Parameters

    • duration_easing: Duration | string

      A string or number determining how long the animation will run. A string indicating which easing function to use for the transition.

    • complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Display or hide the matched elements by animating their opacity.

    see

    https://api.jquery.com/fadeToggle/

    since

    1.0

    since

    1.4.3

    Parameters

    • Optional duration_easing_complete_options: Duration | string | function | EffectsOptions<TElement>

      A string or number determining how long the animation will run. A string indicating which easing function to use for the transition. A function to call once the animation is complete, called once per matched element. A map of additional options to pass to the method.

    Returns this

filter

  • Reduce the set of matched elements to those that match the selector or pass the function's test.

    see

    https://api.jquery.com/filter/

    since

    1.0

    since

    1.4

    Parameters

    • selector: Selector | TypeOrArray<Element> | JQuery | function

      A string containing a selector expression to match the current set of elements against. One or more DOM elements to match the current set of elements against. An existing jQuery object to match the current set of elements against. A function used as a test for each element in the set. this is the current DOM element.

    Returns this

find

  • find(selector: Selector | Element | JQuery): this
  • Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.

    see

    https://api.jquery.com/find/

    since

    1.0

    since

    1.6

    Parameters

    • selector: Selector | Element | JQuery

      A string containing a selector expression to match elements against. An element or a jQuery object to match elements against.

    Returns this

finish

  • finish(queue?: string): this
  • Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements.

    see

    https://api.jquery.com/finish/

    since

    1.9

    Parameters

    • Optional queue: string

      The name of the queue in which to stop animations.

    Returns this

first

  • first(): this

focus

  • Bind an event handler to the "focus" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/focus/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "focus" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/focus/

    since

    1.0

    Parameters

    Returns this

focusin

focusout

  • Bind an event handler to the "focusout" JavaScript event.

    see

    https://api.jquery.com/focusout/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "focusout" JavaScript event.

    see

    https://api.jquery.com/focusout/

    since

    1.4

    Parameters

    Returns this

get

  • get(index: number): TElement
  • get(): TElement[]
  • Retrieve one of the elements matched by the jQuery object.

    see

    https://api.jquery.com/get/

    since

    1.0

    Parameters

    • index: number

      A zero-based integer indicating which element to retrieve.

    Returns TElement

  • Retrieve the elements matched by the jQuery object.

    see

    https://api.jquery.com/get/

    since

    1.0

    Returns TElement[]

has

  • has(selector: string | Element): this
  • Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.

    see

    https://api.jquery.com/has/

    since

    1.4

    Parameters

    • selector: string | Element

      A string containing a selector expression to match elements against. A DOM element to match elements against.

    Returns this

hasClass

  • hasClass(className: string): boolean
  • Determine whether any of the matched elements are assigned the given class.

    see

    https://api.jquery.com/hasClass/

    since

    1.2

    Parameters

    • className: string

      The class name to search for.

    Returns boolean

height

  • height(value: string | number | function): this
  • height(): number | undefined
  • Set the CSS height of every matched element.

    see

    https://api.jquery.com/height/

    since

    1.0

    since

    1.4.1

    Parameters

    • value: string | number | function

      An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string). 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.

    Returns this

  • Get the current computed height for the first element in the set of matched elements.

    see

    https://api.jquery.com/height/

    since

    1.0

    Returns number | undefined

hide

  • hide(duration: Duration, easing: string, complete: function): this
  • hide(duration: Duration, easing_complete: string | function): this
  • hide(duration_complete_options?: Duration | function | EffectsOptions<TElement>): this
  • Hide the matched elements.

    see

    https://api.jquery.com/hide/

    since

    1.4.3

    Parameters

    • duration: Duration

      A string or number determining how long the animation will run.

    • easing: string

      A string indicating which easing function to use for the transition.

    • complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Hide the matched elements.

    see

    https://api.jquery.com/hide/

    since

    1.0

    since

    1.4.3

    Parameters

    • duration: Duration

      A string or number determining how long the animation will run.

    • easing_complete: string | function

      A string indicating which easing function to use for the transition. A function to call once the animation is complete, called once per matched element.

    Returns this

  • Hide the matched elements.

    see

    https://api.jquery.com/hide/

    since

    1.0

    Parameters

    • Optional duration_complete_options: Duration | function | EffectsOptions<TElement>

      A string or number determining how long the animation will run. A function to call once the animation is complete, called once per matched element. A map of additional options to pass to the method.

    Returns this

hover

  • Bind one or two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.

    see

    https://api.jquery.com/hover/

    since

    1.0

    since

    1.4

    Type parameters

    • T

    Parameters

    Returns this

html

  • html(htmlString: htmlString | function): this
  • html(): string
  • Set the HTML contents of each element in the set of matched elements.

    see

    https://api.jquery.com/html/

    since

    1.0

    since

    1.4

    Parameters

    • htmlString: htmlString | function

      A string of HTML to set as the content of each matched element. 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.

    Returns this

  • Get the HTML contents of the first element in the set of matched elements.

    see

    https://api.jquery.com/html/

    since

    1.0

    Returns string

index

  • index(element?: Selector | Element | JQuery): number
  • Search for a given element from among the matched elements.

    see

    https://api.jquery.com/index/

    since

    1.0

    since

    1.4

    Parameters

    • Optional element: Selector | Element | JQuery

      The DOM element or first element within the jQuery object to look for. A selector representing a jQuery collection in which to look for an element.

    Returns number

innerHeight

  • innerHeight(value: string | number | function): this
  • innerHeight(): number | undefined
  • Set the CSS inner height of each element in the set of matched elements.

    see

    https://api.jquery.com/innerHeight/

    since

    1.8.0

    Parameters

    • value: string | number | function

      A number representing the number of pixels, or a number along with an optional unit of measure appended (as a string). 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.

    Returns this

  • Get the current computed height for the first element in the set of matched elements, including padding but not border.

    see

    https://api.jquery.com/innerHeight/

    since

    1.2.6

    Returns number | undefined

innerWidth

  • innerWidth(value: string | number | function): this
  • innerWidth(): number | undefined
  • Set the CSS inner width of each element in the set of matched elements.

    see

    https://api.jquery.com/innerWidth/

    since

    1.8.0

    Parameters

    • value: string | number | function

      A number representing the number of pixels, or a number along with an optional unit of measure appended (as a string). 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.

    Returns this

  • Get the current computed inner width for the first element in the set of matched elements, including padding but not border.

    see

    https://api.jquery.com/innerWidth/

    since

    1.2.6

    Returns number | undefined

insertAfter

  • Insert every element in the set of matched elements after the target.

    see

    https://api.jquery.com/insertAfter/

    since

    1.0

    Parameters

    • target: Selector | htmlString | TypeOrArray<Element> | JQuery

      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.

    Returns this

insertBefore

  • Insert every element in the set of matched elements before the target.

    see

    https://api.jquery.com/insertBefore/

    since

    1.0

    Parameters

    • target: Selector | htmlString | TypeOrArray<Element> | JQuery

      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.

    Returns this

is

  • 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.

    see

    https://api.jquery.com/is/

    since

    1.0

    since

    1.6

    Parameters

    • selector: Selector | TypeOrArray<Element> | JQuery | function

      A string containing a selector expression to match elements against. 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. An existing jQuery object to match the current set of elements against. One or more elements to match the current set of elements against.

    Returns boolean

keydown

  • Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/keydown/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/keydown/

    since

    1.0

    Parameters

    Returns this

keypress

  • Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/keypress/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/keypress/

    since

    1.0

    Parameters

    Returns this

keyup

  • Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/keyup/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/keyup/

    since

    1.0

    Parameters

    Returns this

last

  • last(): this

load

  • load(url: string, data: string | PlainObject, complete: function): this
  • load(url: string, complete_data?: function | string | PlainObject): this
  • Load data from the server and place the returned HTML into the matched element.

    see

    https://api.jquery.com/load/

    since

    1.0

    Parameters

    • url: string

      A string containing the URL to which the request is sent.

    • data: string | PlainObject

      A plain object or string that is sent to the server with the request.

    • complete: function

      A callback function that is executed when the request completes.

        • (this: TElement, responseText: string, textStatus: TextStatus, jqXHR: jqXHR): void
        • Parameters

          Returns void

    Returns this

  • Load data from the server and place the returned HTML into the matched element.

    see

    https://api.jquery.com/load/

    since

    1.0

    Parameters

    • url: string

      A string containing the URL to which the request is sent.

    • Optional complete_data: function | string | PlainObject

      A callback function that is executed when the request completes. A plain object or string that is sent to the server with the request.

    Returns this

map

  • map(callback: function): this
  • Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.

    see

    https://api.jquery.com/map/

    since

    1.2

    Parameters

    • callback: function

      A function object that will be invoked for each element in the current set.

        • (this: TElement, index: number, domElement: TElement): any | any[] | null | undefined
        • Parameters

          • this: TElement
          • index: number
          • domElement: TElement

          Returns any | any[] | null | undefined

    Returns this

mousedown

  • Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/mousedown/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/mousedown/

    since

    1.0

    Parameters

    Returns this

mouseenter

  • Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element.

    see

    https://api.jquery.com/mouseenter/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element.

    see

    https://api.jquery.com/mouseenter/

    since

    1.0

    Parameters

    Returns this

mouseleave

  • Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element.

    see

    https://api.jquery.com/mouseleave/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element.

    see

    https://api.jquery.com/mouseleave/

    since

    1.0

    Parameters

    Returns this

mousemove

  • Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/mousemove/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/mousemove/

    since

    1.0

    Parameters

    Returns this

mouseout

  • Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/mouseout/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/mouseout/

    since

    1.0

    Parameters

    Returns this

mouseover

  • Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/mouseover/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/mouseover/

    since

    1.0

    Parameters

    Returns this

mouseup

  • Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/mouseup/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/mouseup/

    since

    1.0

    Parameters

    Returns this

next

  • 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.

    see

    https://api.jquery.com/next/

    since

    1.0

    Parameters

    • Optional selector: Selector

      A string containing a selector expression to match elements against.

    Returns this

nextAll

  • nextAll(selector?: string): this
  • Get all following siblings of each element in the set of matched elements, optionally filtered by a selector.

    see

    https://api.jquery.com/nextAll/

    since

    1.2

    Parameters

    • Optional selector: string

      A string containing a selector expression to match elements against.

    Returns this

nextUntil

  • Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.

    see

    https://api.jquery.com/nextUntil/

    since

    1.4

    since

    1.6

    Parameters

    • Optional selector: Selector | Element | JQuery

      A string containing a selector expression to indicate where to stop matching following sibling elements. A DOM node or jQuery object indicating where to stop matching following sibling elements.

    • Optional filter: Selector

      A string containing a selector expression to match elements against.

    Returns this

not

  • Remove elements from the set of matched elements.

    see

    https://api.jquery.com/not/

    since

    1.0

    since

    1.4

    Parameters

    • selector: Selector | TypeOrArray<Element> | JQuery | function

      A string containing a selector expression, a DOM element, or an array of elements to match against the set. 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. An existing jQuery object to match the current set of elements against.

    Returns this

off

  • Remove an event handler.

    see

    https://api.jquery.com/off/

    since

    1.7

    Parameters

    • events: string

      One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".

    • selector: Selector

      A selector which should match the one originally passed to .on() when attaching event handlers.

    • handler: EventHandlerBase<any, Event<TElement, any>> | false

      A function to execute each time the event is triggered.

    Returns this

  • Remove an event handler.

    see

    https://api.jquery.com/off/

    since

    1.7

    Parameters

    • events: string

      One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".

    • Optional selector_handler: Selector | EventHandlerBase<any, Event<TElement, any>> | false

      A selector which should match the one originally passed to .on() when attaching event handlers. A function to execute each time the event is triggered.

    Returns this

  • Remove an event handler.

    see

    https://api.jquery.com/off/

    since

    1.7

    Parameters

    • events: PlainObject<EventHandlerBase<any, Event<TElement, any>> | false>

      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).

    • Optional selector: Selector

      A selector which should match the one originally passed to .on() when attaching event handlers.

    Returns this

  • Remove an event handler.

    see

    https://api.jquery.com/off/

    since

    1.7

    Parameters

    • Optional event: Event<TElement>

      A jQuery.Event object.

    Returns this

offset

  • Set the current coordinates of every element in the set of matched elements, relative to the document.

    see

    https://api.jquery.com/offset/

    since

    1.4

    Parameters

    • coordinates: Coordinates | function

      An object containing the properties top and left, which are numbers indicating the new top and left coordinates for the elements. 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.

    Returns this

  • Get the current coordinates of the first element in the set of matched elements, relative to the document.

    see

    https://api.jquery.com/offset/

    since

    1.2

    Returns Coordinates | undefined

offsetParent

  • offsetParent(): this

on

  • Attach an event handler function for one or more events to the selected elements.

    see

    https://api.jquery.com/on/

    since

    1.7

    Type parameters

    • TData

    Parameters

    • events: string

      One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".

    • selector: Selector | null

      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: TData

      Data to be passed to the handler in event.data when an event is triggered.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute when the event is triggered.

    Returns this

  • Attach an event handler function for one or more events to the selected elements.

    see

    https://api.jquery.com/on/

    since

    1.7

    Parameters

    • events: string

      One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".

    • selector: 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.

    • handler: EventHandler<TElement> | EventHandlerBase<any, Event<TElement>> | false

      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.

    Returns this

  • Attach an event handler function for one or more events to the selected elements.

    see

    https://api.jquery.com/on/

    since

    1.7

    Type parameters

    • TData

    Parameters

    • events: string

      One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".

    • data: TData

      Data to be passed to the handler in event.data when an event is triggered.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute when the event is triggered.

    Returns this

  • Attach an event handler function for one or more events to the selected elements.

    see

    https://api.jquery.com/on/

    since

    1.7

    Parameters

    • events: string

      One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".

    • handler: EventHandler<TElement> | EventHandlerBase<any, Event<TElement>> | false

      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.

    Returns this

  • Attach an event handler function for one or more events to the selected elements.

    see

    https://api.jquery.com/on/

    since

    1.7

    Type parameters

    • TData

    Parameters

    • events: PlainObject<EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>> | false>

      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).

    • selector: Selector | null

      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.

    • data: TData

      Data to be passed to the handler in event.data when an event occurs.

    Returns this

  • Attach an event handler function for one or more events to the selected elements.

    see

    https://api.jquery.com/on/

    since

    1.7

    Parameters

    • events: PlainObject<EventHandler<TElement> | EventHandlerBase<any, Event<TElement>> | false>

      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).

    • selector: 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.

    Returns this

  • Attach an event handler function for one or more events to the selected elements.

    see

    https://api.jquery.com/on/

    since

    1.7

    Type parameters

    • TData

    Parameters

    • events: PlainObject<EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>> | false>

      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).

    • data: TData

      Data to be passed to the handler in event.data when an event occurs.

    Returns this

  • Attach an event handler function for one or more events to the selected elements.

    see

    https://api.jquery.com/on/

    since

    1.7

    Parameters

    • events: PlainObject<EventHandler<TElement> | EventHandlerBase<any, Event<TElement>> | false>

      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).

    Returns this

one

  • Attach a handler to an event for the elements. The handler is executed at most once per element per event type.

    see

    https://api.jquery.com/one/

    since

    1.7

    Type parameters

    • TData

    Parameters

    • events: string

      One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".

    • selector: Selector | null

      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: TData

      Data to be passed to the handler in event.data when an event is triggered.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute when the event is triggered.

    Returns this

  • Attach a handler to an event for the elements. The handler is executed at most once per element per event type.

    see

    https://api.jquery.com/one/

    since

    1.7

    Parameters

    • events: string

      One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".

    • selector: 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.

    • handler: EventHandler<TElement> | EventHandlerBase<any, Event<TElement>> | false

      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.

    Returns this

  • Attach a handler to an event for the elements. The handler is executed at most once per element per event type.

    see

    https://api.jquery.com/one/

    since

    1.7

    Type parameters

    • TData

    Parameters

    • events: string

      One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".

    • data: TData

      Data to be passed to the handler in event.data when an event is triggered.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute when the event is triggered.

    Returns this

  • Attach a handler to an event for the elements. The handler is executed at most once per element per event type.

    see

    https://api.jquery.com/one/

    since

    1.7

    Parameters

    • events: string

      One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".

    • handler: EventHandler<TElement> | EventHandlerBase<any, Event<TElement>> | false

      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.

    Returns this

  • Attach a handler to an event for the elements. The handler is executed at most once per element per event type.

    see

    https://api.jquery.com/one/

    since

    1.7

    Type parameters

    • TData

    Parameters

    • events: PlainObject<EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>> | false>

      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).

    • selector: Selector | null

      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.

    • data: TData

      Data to be passed to the handler in event.data when an event occurs.

    Returns this

  • Attach a handler to an event for the elements. The handler is executed at most once per element per event type.

    see

    https://api.jquery.com/one/

    since

    1.7

    Parameters

    • events: PlainObject<EventHandler<TElement> | EventHandlerBase<any, Event<TElement>> | false>

      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).

    • selector: 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.

    Returns this

  • Attach a handler to an event for the elements. The handler is executed at most once per element per event type.

    see

    https://api.jquery.com/one/

    since

    1.7

    Type parameters

    • TData

    Parameters

    • events: PlainObject<EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>> | false>

      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).

    • data: TData

      Data to be passed to the handler in event.data when an event occurs.

    Returns this

  • Attach a handler to an event for the elements. The handler is executed at most once per element per event type.

    see

    https://api.jquery.com/one/

    since

    1.7

    Parameters

    • events: PlainObject<EventHandler<TElement> | EventHandlerBase<any, Event<TElement>> | false>

      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).

    Returns this

outerHeight

  • outerHeight(value: string | number | function): this
  • outerHeight(includeMargin?: boolean): number | undefined
  • Set the CSS outer height of each element in the set of matched elements.

    see

    https://api.jquery.com/outerHeight/

    since

    1.8.0

    Parameters

    • value: string | number | function

      A number representing the number of pixels, or a number along with an optional unit of measure appended (as a string).

    Returns this

  • Get the current computed outer height (including padding, border, and optionally margin) for the first element in the set of matched elements.

    see

    https://api.jquery.com/outerHeight/

    since

    1.2.6

    Parameters

    • Optional includeMargin: boolean

      A Boolean indicating whether to include the element's margin in the calculation.

    Returns number | undefined

outerWidth

  • outerWidth(value: string | number | function): this
  • outerWidth(includeMargin?: boolean): number | undefined
  • Set the CSS outer width of each element in the set of matched elements.

    see

    https://api.jquery.com/outerWidth/

    since

    1.8.0

    Parameters

    • value: string | number | function

      A number representing the number of pixels, or a number along with an optional unit of measure appended (as a string). 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.

    Returns this

  • Get the current computed outer width (including padding, border, and optionally margin) for the first element in the set of matched elements.

    see

    https://api.jquery.com/outerWidth/

    since

    1.2.6

    Parameters

    • Optional includeMargin: boolean

      A Boolean indicating whether to include the element's margin in the calculation.

    Returns number | undefined

parent

  • Get the parent of each element in the current set of matched elements, optionally filtered by a selector.

    see

    https://api.jquery.com/parent/

    since

    1.0

    Parameters

    • Optional selector: Selector

      A string containing a selector expression to match elements against.

    Returns this

parents

  • Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector.

    see

    https://api.jquery.com/parents/

    since

    1.0

    Parameters

    • Optional selector: Selector

      A string containing a selector expression to match elements against.

    Returns this

parentsUntil

  • 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.

    see

    https://api.jquery.com/parentsUntil/

    since

    1.4

    since

    1.6

    Parameters

    • Optional selector: Selector | Element | JQuery

      A string containing a selector expression to indicate where to stop matching ancestor elements. A DOM node or jQuery object indicating where to stop matching ancestor elements.

    • Optional filter: Selector

      A string containing a selector expression to match elements against.

    Returns this

position

prepend

  • Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.

    see

    https://api.jquery.com/prepend/

    since

    1.0

    Parameters

    • Rest ...contents: Array<htmlString | TypeOrArray<Node | JQuery<Node>>>

      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.

    Returns this

  • Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.

    see

    https://api.jquery.com/prepend/

    since

    1.4

    Parameters

    • fn: function

      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.

    Returns this

prependTo

  • Insert every element in the set of matched elements to the beginning of the target.

    see

    https://api.jquery.com/prependTo/

    since

    1.0

    Parameters

    • target: Selector | htmlString | TypeOrArray<Element> | JQuery

      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.

    Returns this

prev

  • 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.

    see

    https://api.jquery.com/prev/

    since

    1.0

    Parameters

    • Optional selector: Selector

      A string containing a selector expression to match elements against.

    Returns this

prevAll

  • Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector.

    see

    https://api.jquery.com/prevAll/

    since

    1.2

    Parameters

    • Optional selector: Selector

      A string containing a selector expression to match elements against.

    Returns this

prevUntil

  • Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.

    see

    https://api.jquery.com/prevUntil/

    since

    1.4

    since

    1.6

    Parameters

    • Optional selector: Selector | Element | JQuery

      A string containing a selector expression to indicate where to stop matching preceding sibling elements. A DOM node or jQuery object indicating where to stop matching preceding sibling elements.

    • Optional filter: Selector

      A string containing a selector expression to match elements against.

    Returns this

promise

  • promise<T>(type: string, target: T): T & Promise<this>
  • promise<T>(target: T): T & Promise<this>
  • promise(type?: string): Promise<this>
  • Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.

    see

    https://api.jquery.com/promise/

    since

    1.6

    Type parameters

    • T: object

    Parameters

    • type: string

      The type of queue that needs to be observed.

    • target: T

      Object onto which the promise methods have to be attached

    Returns T & Promise<this>

  • Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.

    see

    https://api.jquery.com/promise/

    since

    1.6

    Type parameters

    • T: object

    Parameters

    • target: T

      Object onto which the promise methods have to be attached

    Returns T & Promise<this>

  • Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.

    see

    https://api.jquery.com/promise/

    since

    1.6

    Parameters

    • Optional type: string

      The type of queue that needs to be observed.

    Returns Promise<this>

prop

  • prop(propertyName: string, value: function): this
  • prop(propertyName: string, value: any): this
  • prop(properties: PlainObject): this
  • prop(propertyName: string): any | undefined
  • Set one or more properties for the set of matched elements.

    see

    https://api.jquery.com/prop/

    since

    1.6

    Parameters

    • propertyName: string

      The name of the property to set.

    • value: 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.

        • (this: TElement, index: number, oldPropertyValue: any): any
        • Parameters

          • this: TElement
          • index: number
          • oldPropertyValue: any

          Returns any

    Returns this

  • Set one or more properties for the set of matched elements.

    see

    https://api.jquery.com/prop/

    since

    1.6

    Parameters

    • propertyName: string

      The name of the property to set.

    • value: any

      A value to set for the property.

    Returns this

  • Set one or more properties for the set of matched elements.

    see

    https://api.jquery.com/prop/

    since

    1.6

    Parameters

    • properties: PlainObject

      An object of property-value pairs to set.

    Returns this

  • Get the value of a property for the first element in the set of matched elements.

    see

    https://api.jquery.com/prop/

    since

    1.6

    Parameters

    • propertyName: string

      The name of the property to get.

    Returns any | undefined

pushStack

  • pushStack(elements: ArrayLike<Element>, name: string, args: any[]): this
  • pushStack(elements: ArrayLike<Element>): this
  • Add a collection of DOM elements onto the jQuery stack.

    see

    https://api.jquery.com/pushStack/

    since

    1.3

    Parameters

    • elements: ArrayLike<Element>

      An array of elements to push onto the stack and make into a new jQuery object.

    • name: string

      The name of a jQuery method that generated the array of elements.

    • args: any[]

      The arguments that were passed in to the jQuery method (for serialization).

    Returns this

  • Add a collection of DOM elements onto the jQuery stack.

    see

    https://api.jquery.com/pushStack/

    since

    1.0

    Parameters

    • elements: ArrayLike<Element>

      An array of elements to push onto the stack and make into a new jQuery object.

    Returns this

queue

  • Manipulate the queue of functions to be executed, once for each matched element.

    see

    https://api.jquery.com/queue/

    since

    1.2

    Parameters

    • queueName: string

      A string containing the name of the queue. Defaults to fx, the standard effects queue.

    • newQueue: TypeOrArray<QueueFunction<TElement>>

      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.

    Returns this

  • Manipulate the queue of functions to be executed, once for each matched element.

    see

    https://api.jquery.com/queue/

    since

    1.2

    Parameters

    • newQueue: TypeOrArray<QueueFunction<TElement>>

      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.

    Returns this

  • Show the queue of functions to be executed on the matched elements.

    see

    https://api.jquery.com/queue/

    since

    1.2

    Parameters

    • Optional queueName: string

      A string containing the name of the queue. Defaults to fx, the standard effects queue.

    Returns Queue<Node>

ready

  • ready(handler: function): this
  • Specify a function to execute when the DOM is fully loaded.

    see

    https://api.jquery.com/ready/

    since

    1.0

    deprecated

    3.0

    Parameters

    • handler: function

      A function to execute after the DOM is ready.

        • ($: JQueryStatic<TElement>): void
        • Parameters

          • $: JQueryStatic<TElement>

          Returns void

    Returns this

remove

  • remove(selector?: string): this
  • Remove the set of matched elements from the DOM.

    see

    https://api.jquery.com/remove/

    since

    1.0

    Parameters

    • Optional selector: string

      A selector expression that filters the set of matched elements to be removed.

    Returns this

removeAttr

  • removeAttr(attributeName: string): this
  • Remove an attribute from each element in the set of matched elements.

    see

    https://api.jquery.com/removeAttr/

    since

    1.0

    Parameters

    • attributeName: string

      An attribute to remove; as of version 1.7, it can be a space-separated list of attributes.

    Returns this

removeClass

  • removeClass(className?: string | function): this
  • Remove a single class, multiple classes, or all classes from each element in the set of matched elements.

    see

    https://api.jquery.com/removeClass/

    since

    1.0

    since

    1.4

    Parameters

    • Optional className: string | function

      One or more space-separated classes to be removed from the class attribute of each matched element. 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.

    Returns this

removeData

  • Remove a previously-stored piece of data.

    see

    https://api.jquery.com/removeData/

    since

    1.2.3

    since

    1.7

    Parameters

    • Optional name: TypeOrArray<string>

      A string naming the piece of data to delete. An array or space-separated string naming the pieces of data to delete.

    Returns this

removeProp

  • removeProp(propertyName: string): this
  • Remove a property for the set of matched elements.

    see

    https://api.jquery.com/removeProp/

    since

    1.6

    Parameters

    • propertyName: string

      The name of the property to remove.

    Returns this

replaceAll

  • Replace each target element with the set of matched elements.

    see

    https://api.jquery.com/replaceAll/

    since

    1.2

    Parameters

    • target: Selector | JQuery | TypeOrArray<Element>

      A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace.

    Returns this

replaceWith

  • Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.

    see

    https://api.jquery.com/replaceWith/

    since

    1.2

    since

    1.4

    Parameters

    • newContent: htmlString | JQuery | TypeOrArray<Element> | function

      The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object. A function that returns content with which to replace the set of matched elements.

    Returns this

resize

  • Bind an event handler to the "resize" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/resize/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "resize" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/resize/

    since

    1.0

    Parameters

    Returns this

scroll

  • Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/scroll/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/scroll/

    since

    1.0

    Parameters

    Returns this

scrollLeft

  • scrollLeft(value: number): this
  • scrollLeft(): number | undefined
  • Set the current horizontal position of the scroll bar for each of the set of matched elements.

    see

    https://api.jquery.com/scrollLeft/

    since

    1.2.6

    Parameters

    • value: number

      An integer indicating the new position to set the scroll bar to.

    Returns this

  • Get the current horizontal position of the scroll bar for the first element in the set of matched elements.

    see

    https://api.jquery.com/scrollLeft/

    since

    1.2.6

    Returns number | undefined

scrollTop

  • scrollTop(value: number): this
  • scrollTop(): number | undefined
  • Set the current vertical position of the scroll bar for each of the set of matched elements.

    see

    https://api.jquery.com/scrollTop/

    since

    1.2.6

    Parameters

    • value: number

      A number indicating the new position to set the scroll bar to.

    Returns 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

    https://api.jquery.com/scrollTop/

    since

    1.2.6

    Returns number | undefined

select

  • Bind an event handler to the "select" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/select/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "select" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/select/

    since

    1.0

    Parameters

    Returns this

serialize

  • serialize(): string

serializeArray

show

  • show(duration: Duration, easing: string, complete: function): this
  • show(duration: Duration, easing_complete: string | function): this
  • show(duration_complete_options?: Duration | function | EffectsOptions<TElement>): this
  • Display the matched elements.

    see

    https://api.jquery.com/show/

    since

    1.4.3

    Parameters

    • duration: Duration

      A string or number determining how long the animation will run.

    • easing: string

      A string indicating which easing function to use for the transition.

    • complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Display the matched elements.

    see

    https://api.jquery.com/show/

    since

    1.0

    since

    1.4.3

    Parameters

    • duration: Duration

      A string or number determining how long the animation will run.

    • easing_complete: string | function

      A string indicating which easing function to use for the transition. A function to call once the animation is complete, called once per matched element.

    Returns this

  • Display the matched elements.

    see

    https://api.jquery.com/show/

    since

    1.0

    Parameters

    • Optional duration_complete_options: Duration | function | EffectsOptions<TElement>

      A string or number determining how long the animation will run. A function to call once the animation is complete, called once per matched element. A map of additional options to pass to the method.

    Returns this

siblings

  • Get the siblings of each element in the set of matched elements, optionally filtered by a selector.

    see

    https://api.jquery.com/siblings/

    since

    1.0

    Parameters

    • Optional selector: Selector

      A string containing a selector expression to match elements against.

    Returns this

slice

  • slice(start: number, end?: number): this
  • Reduce the set of matched elements to a subset specified by a range of indices.

    see

    https://api.jquery.com/slice/

    since

    1.1.4

    Parameters

    • start: number

      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.

    • Optional end: number

      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.

    Returns this

slideDown

  • slideDown(duration: Duration, easing: string, complete?: function): this
  • slideDown(duration_easing: Duration | string, complete: function): this
  • slideDown(duration_easing_complete_options?: Duration | string | function | EffectsOptions<TElement>): this
  • Display the matched elements with a sliding motion.

    see

    https://api.jquery.com/slideDown/

    since

    1.4.3

    Parameters

    • duration: Duration

      A string or number determining how long the animation will run.

    • easing: string

      A string indicating which easing function to use for the transition.

    • Optional complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Display the matched elements with a sliding motion.

    see

    https://api.jquery.com/slideDown/

    since

    1.0

    since

    1.4.3

    Parameters

    • duration_easing: Duration | string

      A string or number determining how long the animation will run. A string indicating which easing function to use for the transition.

    • complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Display the matched elements with a sliding motion.

    see

    https://api.jquery.com/slideDown/

    since

    1.0

    since

    1.4.3

    Parameters

    • Optional duration_easing_complete_options: Duration | string | function | EffectsOptions<TElement>

      A string or number determining how long the animation will run. A string indicating which easing function to use for the transition. A function to call once the animation is complete, called once per matched element. A map of additional options to pass to the method.

    Returns this

slideToggle

  • slideToggle(duration: Duration, easing: string, complete?: function): this
  • slideToggle(duration_easing: Duration | string, complete: function): this
  • slideToggle(duration_easing_complete_options?: Duration | string | function | EffectsOptions<TElement>): this
  • Display or hide the matched elements with a sliding motion.

    see

    https://api.jquery.com/slideToggle/

    since

    1.4.3

    Parameters

    • duration: Duration

      A string or number determining how long the animation will run.

    • easing: string

      A string indicating which easing function to use for the transition.

    • Optional complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Display or hide the matched elements with a sliding motion.

    see

    https://api.jquery.com/slideToggle/

    since

    1.0

    since

    1.4.3

    Parameters

    • duration_easing: Duration | string

      A string or number determining how long the animation will run. A string indicating which easing function to use for the transition.

    • complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Display or hide the matched elements with a sliding motion.

    see

    https://api.jquery.com/slideToggle/

    since

    1.0

    since

    1.4.3

    Parameters

    • Optional duration_easing_complete_options: Duration | string | function | EffectsOptions<TElement>

      A string or number determining how long the animation will run. A string indicating which easing function to use for the transition. A function to call once the animation is complete, called once per matched element. A map of additional options to pass to the method.

    Returns this

slideUp

  • slideUp(duration: Duration, easing: string, complete?: function): this
  • slideUp(duration_easing: Duration | string, complete: function): this
  • slideUp(duration_easing_complete_options?: Duration | string | function | EffectsOptions<TElement>): this
  • Hide the matched elements with a sliding motion.

    see

    https://api.jquery.com/slideUp/

    since

    1.4.3

    Parameters

    • duration: Duration

      A string or number determining how long the animation will run.

    • easing: string

      A string indicating which easing function to use for the transition.

    • Optional complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Hide the matched elements with a sliding motion.

    see

    https://api.jquery.com/slideUp/

    since

    1.0

    since

    1.4.3

    Parameters

    • duration_easing: Duration | string

      A string or number determining how long the animation will run. A string indicating which easing function to use for the transition.

    • complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Hide the matched elements with a sliding motion.

    see

    https://api.jquery.com/slideUp/

    since

    1.0

    since

    1.4.3

    Parameters

    • Optional duration_easing_complete_options: Duration | string | function | EffectsOptions<TElement>

      A string or number determining how long the animation will run. A string indicating which easing function to use for the transition. A function to call once the animation is complete, called once per matched element. A map of additional options to pass to the method.

    Returns this

stop

  • stop(queue: string, clearQueue?: boolean, jumpToEnd?: boolean): this
  • stop(clearQueue?: boolean, jumpToEnd?: boolean): this
  • Stop the currently-running animation on the matched elements.

    see

    https://api.jquery.com/stop/

    since

    1.7

    Parameters

    • queue: string

      The name of the queue in which to stop animations.

    • Optional clearQueue: boolean

      A Boolean indicating whether to remove queued animation as well. Defaults to false.

    • Optional jumpToEnd: boolean

      A Boolean indicating whether to complete the current animation immediately. Defaults to false.

    Returns this

  • Stop the currently-running animation on the matched elements.

    see

    https://api.jquery.com/stop/

    since

    1.2

    Parameters

    • Optional clearQueue: boolean

      A Boolean indicating whether to remove queued animation as well. Defaults to false.

    • Optional jumpToEnd: boolean

      A Boolean indicating whether to complete the current animation immediately. Defaults to false.

    Returns this

submit

  • Bind an event handler to the "submit" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/submit/

    since

    1.4.3

    Type parameters

    • TData

    Parameters

    • eventData: TData

      An object containing data that will be passed to the event handler.

    • handler: EventHandler<TElement, TData> | EventHandlerBase<any, Event<TElement, TData>>

      A function to execute each time the event is triggered.

    Returns this

  • Bind an event handler to the "submit" JavaScript event, or trigger that event on an element.

    see

    https://api.jquery.com/submit/

    since

    1.0

    Parameters

    Returns this

text

  • text(text: string | number | boolean | function): this
  • text(): string
  • Set the content of each element in the set of matched elements to the specified text.

    see

    https://api.jquery.com/text/

    since

    1.0

    since

    1.4

    Parameters

    • text: string | number | boolean | function

      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. 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.

    Returns this

  • Get the combined text contents of each element in the set of matched elements, including their descendants.

    see

    https://api.jquery.com/text/

    since

    1.0

    Returns string

toArray

  • toArray(): TElement[]

toggle

  • toggle(duration: Duration, easing: string, complete?: function): this
  • toggle(duration: Duration, complete: function): this
  • toggle(duration_complete_options_display?: Duration | function | EffectsOptions<TElement> | boolean): this
  • Display or hide the matched elements.

    see

    https://api.jquery.com/toggle/

    since

    1.4.3

    Parameters

    • duration: Duration

      A string or number determining how long the animation will run.

    • easing: string

      A string indicating which easing function to use for the transition.

    • Optional complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Display or hide the matched elements.

    see

    https://api.jquery.com/toggle/

    since

    1.0

    Parameters

    • duration: Duration

      A string or number determining how long the animation will run.

    • complete: function

      A function to call once the animation is complete, called once per matched element.

        • (this: TElement): void
        • Parameters

          • this: TElement

          Returns void

    Returns this

  • Display or hide the matched elements.

    see

    https://api.jquery.com/toggle/

    since

    1.0

    since

    1.3

    Parameters

    • Optional duration_complete_options_display: Duration | function | EffectsOptions<TElement> | boolean

      A string or number determining how long the animation will run. A function to call once the animation is complete, called once per matched element. A map of additional options to pass to the method. Use true to show the element or false to hide it.

    Returns this

toggleClass

  • toggleClass<TState>(className: string | function, state?: TState): this
  • toggleClass(state?: 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.

    see

    https://api.jquery.com/toggleClass/

    since

    1.0

    since

    1.3

    since

    1.4

    Type parameters

    • TState: boolean

    Parameters

    • className: string | function

      One or more class names (separated by spaces) to be toggled for each element in the matched set. 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.

    • Optional state: TState

      A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed.

    Returns 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.

    see

    https://api.jquery.com/toggleClass/

    since

    1.4

    deprecated

    3.0

    Parameters

    • Optional state: boolean

      A boolean value to determine whether the class should be added or removed.

    Returns this

trigger

  • trigger(eventType: string | Event<TElement>, extraParameters?: any[] | PlainObject | string | number): this
  • Execute all handlers and behaviors attached to the matched elements for the given event type.

    see

    https://api.jquery.com/trigger/

    since

    1.0

    since

    1.3

    Parameters

    • eventType: string | Event<TElement>

      A string containing a JavaScript event type, such as click or submit. A jQuery.Event object.

    • Optional extraParameters: any[] | PlainObject | string | number

      Additional parameters to pass along to the event handler.

    Returns this

triggerHandler

  • triggerHandler(eventType: string | Event<TElement>, extraParameters?: any[] | PlainObject | string | number): undefined | any
  • Execute all handlers attached to an element for an event.

    see

    https://api.jquery.com/triggerHandler/

    since

    1.2

    since

    1.3

    Parameters

    • eventType: string | Event<TElement>

      A string containing a JavaScript event type, such as click or submit. A jQuery.Event object.

    • Optional extraParameters: any[] | PlainObject | string | number

      Additional parameters to pass along to the event handler.

    Returns undefined | any

unbind

  • unbind(event: string, handler: EventHandlerBase<any, Event<TElement, any>> | false): this
  • unbind(event?: string | Event<TElement>): this
  • Remove a previously-attached event handler from the elements.

    see

    https://api.jquery.com/unbind/

    since

    1.0

    since

    1.4.3

    deprecated

    3.0

    Parameters

    • event: string

      A string containing one or more DOM event types, such as "click" or "submit," or custom event names.

    • handler: EventHandlerBase<any, Event<TElement, any>> | false

      A function to execute each time the event is triggered.

    Returns this

  • Remove a previously-attached event handler from the elements.

    see

    https://api.jquery.com/unbind/

    since

    1.0

    deprecated

    3.0

    Parameters

    • Optional event: string | Event<TElement>

      A string containing one or more DOM event types, such as "click" or "submit," or custom event names. A jQuery.Event object.

    Returns this

undelegate

  • Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.

    see

    https://api.jquery.com/undelegate/

    since

    1.4.2

    deprecated

    3.0

    Parameters

    • selector: Selector

      A selector which will be used to filter the event results.

    • eventType: string

      A string containing a JavaScript event type, such as "click" or "keydown"

    • handler: EventHandlerBase<any, Event<TElement, any>> | false

      A function to execute each time the event is triggered.

    Returns this

  • Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.

    see

    https://api.jquery.com/undelegate/

    since

    1.4.2

    since

    1.4.3

    deprecated

    3.0

    Parameters

    • selector: Selector

      A selector which will be used to filter the event results.

    • eventTypes: string | PlainObject<EventHandlerBase<any, Event<TElement, any>> | false>

      A string containing a JavaScript event type, such as "click" or "keydown" An object of one or more event types and previously bound functions to unbind from them.

    Returns this

  • Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.

    see

    https://api.jquery.com/undelegate/

    since

    1.4.2

    since

    1.6

    deprecated

    3.0

    Parameters

    • Optional namespace: string

      A selector which will be used to filter the event results.

    Returns this

unwrap

  • unwrap(selector?: string): this
  • Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.

    see

    https://api.jquery.com/unwrap/

    since

    1.4

    since

    3.0

    Parameters

    • Optional selector: string

      A selector to check the parent element against. If an element's parent does not match the selector, the element won't be unwrapped.

    Returns this

val

  • val(value: string | number | string[] | function): this
  • val(): string | number | string[] | undefined
  • Set the value of each element in the set of matched elements.

    see

    https://api.jquery.com/val/

    since

    1.0

    since

    1.4

    Parameters

    • value: string | number | string[] | function

      A string of text, a number, or an array of strings corresponding to the value of each matched element to set as selected/checked. 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.

    Returns this

  • Get the current value of the first element in the set of matched elements.

    see

    https://api.jquery.com/val/

    since

    1.0

    Returns string | number | string[] | undefined

width

  • width(value: string | number | function): this
  • width(): number | undefined
  • Set the CSS width of each element in the set of matched elements.

    see

    https://api.jquery.com/width/

    since

    1.0

    since

    1.4.1

    Parameters

    • value: string | number | function

      An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). 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.

    Returns this

  • Get the current computed width for the first element in the set of matched elements.

    see

    https://api.jquery.com/width/

    since

    1.0

    Returns number | undefined

wrap

  • Wrap an HTML structure around each element in the set of matched elements.

    see

    https://api.jquery.com/wrap/

    since

    1.0

    since

    1.4

    Parameters

    • wrappingElement: Selector | htmlString | Element | JQuery | function

      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. 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.

    Returns this

wrapAll

  • Wrap an HTML structure around all elements in the set of matched elements.

    see

    https://api.jquery.com/wrapAll/

    since

    1.2

    since

    1.4

    Parameters

    • wrappingElement: Selector | htmlString | Element | JQuery | function

      A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. 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.

    Returns this

wrapInner

  • Wrap an HTML structure around the content of each element in the set of matched elements.

    see

    https://api.jquery.com/wrapInner/

    since

    1.2

    since

    1.4

    Parameters

    • wrappingElement: Selector | htmlString | Element | JQuery | function

      An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements. 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.

    Returns this