Interface JQuery

The jQuery instance members

Index

Index signatures

Properties

Methods

Index signatures

(index: string): any

Parameters

  • index: string

Returns

any

(index: number): HTMLElement

Parameters

  • index: number

Returns

HTMLElement

Properties

public context: Element

The DOM node context originally passed to jQuery(); if none was passed then context will likely be the document. (DEPRECATED from v1.10)

public jquery: string

public length: number

The number of elements in the jQuery object.

public selector: string

A selector representing selector passed to jQuery(), if any, when creating the original set. version deprecated: 1.7, removed: 1.9

Methods

public add(selector: string, context?: Element): JQuery

Add elements to the set of matched elements.

Parameters

  • selector: string

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

  • context?: Element optional

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

Returns

JQuery

public add(elements?: Array<Element>): JQuery

Add elements to the set of matched elements.

Parameters

  • elements?: Array<Element> optional

    One or more elements to add to the set of matched elements.

Returns

JQuery

public add(html: string): JQuery

Add elements to the set of matched elements.

Parameters

  • html: string

    An HTML fragment to add to the set of matched elements.

Returns

JQuery

public add(obj: JQuery): JQuery

Add elements to the set of matched elements.

Parameters

  • obj: JQuery

    An existing jQuery object to add to the set of matched elements.

Returns

JQuery

public addBack(selector?: string): JQuery

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

Parameters

  • selector?: string optional

Returns

JQuery

public addClass(className: string): JQuery

Adds the specified class(es) to each of the set of matched elements.

Parameters

  • className: string

    One or more space-separated classes to be added to the class attribute of each matched element.

Returns

JQuery

public addClass(func: (index: number, className: string) => string): JQuery

Adds the specified class(es) to each of the set of matched elements.

Parameters

  • func: (index: number, className: string) => string

Returns

JQuery

public after(content1: JQuery, content2?: Array<any>): JQuery

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

param content1 HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements.

Parameters

  • content1: JQuery
  • content2?: Array<any> optional

Returns

JQuery

public after(content1: Array<any>, content2?: Array<any>): JQuery

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

param content1 HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements.

Parameters

  • content1: Array<any>
  • content2?: Array<any> optional

Returns

JQuery

public after(content1: Element, content2?: Array<any>): JQuery

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

param content1 HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements.

Parameters

  • content1: Element
  • content2?: Array<any> optional

Returns

JQuery

public after(content1: Text, content2?: Array<any>): JQuery

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

param content1 HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements.

Parameters

  • content1: Text
  • content2?: Array<any> optional

Returns

JQuery

public after(content1: string, content2?: Array<any>): JQuery

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

param content1 HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements.

Parameters

  • content1: string
  • content2?: Array<any> optional

Returns

JQuery

public after(func: (index: number) => any): JQuery

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

param func A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.

Parameters

  • func: (index: number) => any

Returns

JQuery

public ajaxComplete(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: any) => any): JQuery

Register a handler to be called when Ajax requests complete. This is an AjaxEvent.

Parameters

  • handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: any) => any

    The function to be invoked.

Returns

JQuery

public ajaxError(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxSettings: JQueryAjaxSettings, thrownError: any) => any): JQuery

Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event.

Parameters

  • handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxSettings: JQueryAjaxSettings, thrownError: any) => any

    The function to be invoked.

Returns

JQuery

public ajaxSend(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxOptions: JQueryAjaxSettings) => any): JQuery

Attach a function to be executed before an Ajax request is sent. This is an Ajax Event.

Parameters

  • handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxOptions: JQueryAjaxSettings) => any

    The function to be invoked.

Returns

JQuery

public ajaxStart(handler: () => any): JQuery

Register a handler to be called when the first Ajax request begins. This is an Ajax Event.

Parameters

  • handler: () => any

    The function to be invoked.

Returns

JQuery

public ajaxStop(handler: () => any): JQuery

Register a handler to be called when all Ajax requests have completed. This is an Ajax Event.

Parameters

  • handler: () => any

    The function to be invoked.

Returns

JQuery

public ajaxSuccess(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: JQueryAjaxSettings) => any): JQuery

Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.

Parameters

  • handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: JQueryAjaxSettings) => any

    The function to be invoked.

Returns

JQuery

public animate(properties: Object, duration?: string, complete?: Function): JQuery

Perform a custom animation of a set of CSS properties.

Parameters

  • properties: Object

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

  • duration?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public animate(properties: Object, duration?: number, complete?: Function): JQuery

Perform a custom animation of a set of CSS properties.

Parameters

  • properties: Object

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

  • duration?: number optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public animate(properties: Object, duration?: string, easing?: string, complete?: Function): JQuery

Perform a custom animation of a set of CSS properties.

Parameters

  • properties: Object

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

  • duration?: string optional

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

  • easing?: string optional

    A string indicating which easing function to use for the transition. (default: swing)

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public animate(properties: Object, duration?: number, easing?: string, complete?: Function): JQuery

Perform a custom animation of a set of CSS properties.

Parameters

  • properties: Object

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

  • duration?: number optional

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

  • easing?: string optional

    A string indicating which easing function to use for the transition. (default: swing)

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public animate(properties: Object, options: JQueryAnimationOptions): JQuery

Perform a custom animation of a set of CSS properties.

Parameters

  • properties: Object

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

  • options: JQueryAnimationOptions

    A map of additional options to pass to the method.

Returns

JQuery

public append(content1: JQuery, content2?: Array<any>): JQuery

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

param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.

Parameters

  • content1: JQuery
  • content2?: Array<any> optional

Returns

JQuery

public append(content1: Array<any>, content2?: Array<any>): JQuery

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

param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.

Parameters

  • content1: Array<any>
  • content2?: Array<any> optional

Returns

JQuery

public append(content1: Element, content2?: Array<any>): JQuery

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

param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.

Parameters

  • content1: Element
  • content2?: Array<any> optional

Returns

JQuery

public append(content1: Text, content2?: Array<any>): JQuery

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

param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.

Parameters

  • content1: Text
  • content2?: Array<any> optional

Returns

JQuery

public append(content1: string, content2?: Array<any>): JQuery

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

param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.

Parameters

  • content1: string
  • content2?: Array<any> optional

Returns

JQuery

public append(func: (index: number, html: string) => any): JQuery

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

param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.

Parameters

  • func: (index: number, html: string) => any

Returns

JQuery

public appendTo(target: JQuery): JQuery

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

Parameters

  • target: 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

JQuery

public appendTo(target: Array<any>): JQuery

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

Parameters

  • target: Array<any>

    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

JQuery

public appendTo(target: Element): JQuery

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

Parameters

  • target: Element

    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

JQuery

public appendTo(target: string): JQuery

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

Parameters

  • target: string

    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

JQuery

public attr(attributeName: string): string

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

Parameters

  • attributeName: string

    The name of the attribute to get.

Returns

string

public attr(attributeName: string, value: string): JQuery

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

Parameters

  • attributeName: string

    The name of the attribute to set.

  • value: string

    A value to set for the attribute.

Returns

JQuery

public attr(attributeName: string, value: number): JQuery

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

Parameters

  • attributeName: string

    The name of the attribute to set.

  • value: number

    A value to set for the attribute.

Returns

JQuery

public attr(attributeName: string, func: (index: number, attr: any) => any): JQuery

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

Parameters

  • attributeName: string

    The name of the attribute to set.

  • func: (index: number, attr: any) => any

    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

JQuery

public attr(attributes: Object): JQuery

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

Parameters

  • attributes: Object

    An object of attribute-value pairs to set.

Returns

JQuery

public before(content1: JQuery, content2?: Array<any>): JQuery

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

param content1 HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements.

Parameters

  • content1: JQuery
  • content2?: Array<any> optional

Returns

JQuery

public before(content1: Array<any>, content2?: Array<any>): JQuery

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

param content1 HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements.

Parameters

  • content1: Array<any>
  • content2?: Array<any> optional

Returns

JQuery

public before(content1: Element, content2?: Array<any>): JQuery

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

param content1 HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements.

Parameters

  • content1: Element
  • content2?: Array<any> optional

Returns

JQuery

public before(content1: Text, content2?: Array<any>): JQuery

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

param content1 HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements.

Parameters

  • content1: Text
  • content2?: Array<any> optional

Returns

JQuery

public before(content1: string, content2?: Array<any>): JQuery

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

param content1 HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements.

Parameters

  • content1: string
  • content2?: Array<any> optional

Returns

JQuery

public before(func: (index: number) => any): JQuery

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

param func A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.

Parameters

  • func: (index: number) => any

Returns

JQuery

public bind(eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery

Attach a handler to an event for the elements.

Parameters

  • eventType: string

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

  • eventData: any

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

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public bind(eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery

Attach a handler to an event for the elements.

Parameters

  • eventType: string

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

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public bind(eventType: string, eventData: any, preventBubble: boolean): JQuery

Attach a handler to an event for the elements.

Parameters

  • eventType: string

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

  • eventData: any

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

  • preventBubble: boolean

    Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true.

Returns

JQuery

public bind(eventType: string, preventBubble: boolean): JQuery

Attach a handler to an event for the elements.

Parameters

  • eventType: string

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

  • preventBubble: boolean

    Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true.

Returns

JQuery

public bind(events: any): JQuery

Attach a handler to an event for the elements.

Parameters

  • events: any

    An object containing one or more DOM event types and functions to execute for them.

Returns

JQuery

public blur(): JQuery

Trigger the "blur" event on an element

Returns

JQuery

public blur(handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "blur" JavaScript event

Parameters

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public blur(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "blur" JavaScript event

Parameters

  • eventData?: any optional

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

  • handler?: (eventObject: JQueryEventObject) => any optional

    A function to execute each time the event is triggered.

Returns

JQuery

public change(): JQuery

Trigger the "change" event on an element.

Returns

JQuery

public change(handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "change" JavaScript event

Parameters

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public change(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "change" JavaScript event

Parameters

  • eventData?: any optional

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

  • handler?: (eventObject: JQueryEventObject) => any optional

    A function to execute each time the event is triggered.

Returns

JQuery

public children(selector?: string): JQuery

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

Parameters

  • selector?: string optional

    A string containing a selector expression to match elements against.

Returns

JQuery

public clearQueue(queueName?: string): JQuery

Remove from the queue all items that have not yet been run.

Parameters

  • queueName?: string optional

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

Returns

JQuery

public click(): JQuery

Trigger the "click" event on an element.

Returns

JQuery

public click(handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "click" JavaScript event

Parameters

  • handler: (eventObject: JQueryEventObject) => any

Returns

JQuery

public click(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "click" JavaScript event

Parameters

  • eventData?: any optional

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

  • handler?: (eventObject: JQueryEventObject) => any optional

    A function to execute each time the event is triggered.

Returns

JQuery

public clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): JQuery

Create a deep copy of the set of matched elements.

param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false. param deepWithDataAndEvents A Boolean indicating whether event handlers and data for all children of the cloned element should be copied. By default its value matches the first argument's value (which defaults to false).

Parameters

  • withDataAndEvents?: boolean optional
  • deepWithDataAndEvents?: boolean optional

Returns

JQuery

public closest(selector: string): JQuery

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.

Parameters

  • selector: string

    A string containing a selector expression to match elements against.

Returns

JQuery

public closest(selector: string, context?: Element): JQuery

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.

Parameters

  • selector: string

    A string containing a selector expression to match elements against.

  • context?: Element optional

    A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead.

Returns

JQuery

public closest(obj: JQuery): JQuery

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.

Parameters

  • obj: JQuery

    A jQuery object to match elements against.

Returns

JQuery

public closest(element: Element): JQuery

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.

Parameters

  • element: Element

    An element to match elements against.

Returns

JQuery

public closest(selectors: any, context?: Element): Array<any>

Get an array of all the elements and selectors matched against the current element up through the DOM tree.

Parameters

  • selectors: any

    An array or string containing a selector expression to match elements against (can also be a jQuery object).

  • context?: Element optional

    A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead.

Returns

Array<any>

public contents(): JQuery

Get the children of each element in the set of matched elements, including text and comment nodes.

Returns

JQuery

public css(propertyName: string): string

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

Parameters

  • propertyName: string

    A CSS property.

Returns

string

public css(propertyName: string, value: string): JQuery

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

Parameters

  • propertyName: string

    A CSS property name.

  • value: string

    A value to set for the property.

Returns

JQuery

public css(propertyName: string, value: number): JQuery

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

Parameters

  • propertyName: string

    A CSS property name.

  • value: number

    A value to set for the property.

Returns

JQuery

public css(propertyName: string, value: Array<string>): JQuery

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

Parameters

  • propertyName: string

    A CSS property name.

  • value: Array<string>

    A value to set for the property.

Returns

JQuery

public css(propertyName: string, value: Array<number>): JQuery

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

Parameters

  • propertyName: string

    A CSS property name.

  • value: Array<number>

    A value to set for the property.

Returns

JQuery

public css(propertyName: string, value: (index: number, value: string) => string): JQuery

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

Parameters

  • propertyName: string

    A CSS property name.

  • value: (index: number, value: string) => string

    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

JQuery

public css(propertyName: string, value: (index: number, value: number) => number): JQuery

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

Parameters

  • propertyName: string

    A CSS property name.

  • value: (index: number, value: number) => number

    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

JQuery

public css(properties: Object): JQuery

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

Parameters

  • properties: Object

    An object of property-value pairs to set.

Returns

JQuery

public data(key: string, value: any): JQuery

Store arbitrary data associated with the matched elements.

Parameters

  • key: string

    A string naming the piece of data to set.

  • value: any

    The new data value; it can be any Javascript type including Array or Object.

Returns

JQuery

public data(obj: { [key: string]: any; }): JQuery

Store arbitrary data associated with the matched elements.

Parameters

  • obj: { [key: string]: any; }

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

Returns

JQuery

public data(key: string): any

Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute.

Parameters

  • key: string

    Name of the data stored.

Returns

any

public data(): 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.

Returns

any

public dblclick(): JQuery

Trigger the "dblclick" event on an element.

Returns

JQuery

public dblclick(handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "dblclick" JavaScript event

Parameters

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public dblclick(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "dblclick" JavaScript event

Parameters

  • eventData?: any optional

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

  • handler?: (eventObject: JQueryEventObject) => any optional

    A function to execute each time the event is triggered.

Returns

JQuery

public delay(duration: number, queueName?: string): JQuery

Set a timer to delay execution of subsequent items in the queue.

Parameters

  • duration: number

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

  • queueName?: string optional

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

Returns

JQuery

public delegate(selector: any, eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery

Parameters

  • selector: any
  • eventType: string
  • handler: (eventObject: JQueryEventObject) => any

Returns

JQuery

public delegate(selector: any, eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery

Parameters

  • selector: any
  • eventType: string
  • eventData: any
  • handler: (eventObject: JQueryEventObject) => any

Returns

JQuery

public dequeue(queueName?: string): JQuery

Execute the next function on the queue for the matched elements.

Parameters

  • queueName?: string optional

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

Returns

JQuery

public detach(selector?: string): JQuery

Remove the set of matched elements from the DOM.

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

Parameters

  • selector?: string optional

Returns

JQuery

public each(func: (index: number, elem: Element) => any): JQuery

Iterate over a jQuery object, executing a function for each matched element.

Parameters

  • func: (index: number, elem: Element) => any

    A function to execute for each matched element.

Returns

JQuery

public empty(): JQuery

Remove all child nodes of the set of matched elements from the DOM.

Returns

JQuery

public end(): JQuery

End the most recent filtering operation in the current chain and return the set of matched elements to its previous state.

Returns

JQuery

public eq(index: number): JQuery

Reduce the set of matched elements to the one at the specified index.

Parameters

  • index: number

    An integer indicating the 0-based position of the element. OR An integer indicating the position of the element, counting backwards from the last element in the set.

Returns

JQuery

public error(handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8)

Parameters

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute when the event is triggered.

Returns

JQuery

public error(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8)

Parameters

  • eventData: any

    A plain object of data that will be passed to the event handler.

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute when the event is triggered.

Returns

JQuery

public fadeIn(duration?: number, complete?: Function): JQuery

Display the matched elements by fading them to opaque.

Parameters

  • duration?: number optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public fadeIn(duration?: string, complete?: Function): JQuery

Display the matched elements by fading them to opaque.

Parameters

  • duration?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public fadeIn(duration?: number, easing?: string, complete?: Function): JQuery

Display the matched elements by fading them to opaque.

Parameters

  • duration?: number optional

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

  • easing?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public fadeIn(duration?: string, easing?: string, complete?: Function): JQuery

Display the matched elements by fading them to opaque.

Parameters

  • duration?: string optional

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

  • easing?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public fadeIn(options: JQueryAnimationOptions): JQuery

Display the matched elements by fading them to opaque.

Parameters

Returns

JQuery

public fadeOut(duration?: number, complete?: Function): JQuery

Hide the matched elements by fading them to transparent.

Parameters

  • duration?: number optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public fadeOut(duration?: string, complete?: Function): JQuery

Hide the matched elements by fading them to transparent.

Parameters

  • duration?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public fadeOut(duration?: number, easing?: string, complete?: Function): JQuery

Hide the matched elements by fading them to transparent.

Parameters

  • duration?: number optional

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

  • easing?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public fadeOut(duration?: string, easing?: string, complete?: Function): JQuery

Hide the matched elements by fading them to transparent.

Parameters

  • duration?: string optional

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

  • easing?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public fadeOut(options: JQueryAnimationOptions): JQuery

Hide the matched elements by fading them to transparent.

Parameters

Returns

JQuery

public fadeTo(duration: string, opacity: number, complete?: Function): JQuery

Adjust the opacity of the matched elements.

Parameters

  • duration: string

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

  • opacity: number

    A number between 0 and 1 denoting the target opacity.

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public fadeTo(duration: number, opacity: number, complete?: Function): JQuery

Adjust the opacity of the matched elements.

Parameters

  • duration: number

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

  • opacity: number

    A number between 0 and 1 denoting the target opacity.

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public fadeTo(duration: string, opacity: number, easing?: string, complete?: Function): JQuery

Adjust the opacity of the matched elements.

Parameters

  • duration: string

    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 optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public fadeTo(duration: number, opacity: number, easing?: string, complete?: Function): JQuery

Adjust the opacity of the matched elements.

Parameters

  • duration: number

    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 optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public fadeToggle(duration?: number, complete?: Function): JQuery

Display or hide the matched elements by animating their opacity.

Parameters

  • duration?: number optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public fadeToggle(duration?: string, complete?: Function): JQuery

Display or hide the matched elements by animating their opacity.

Parameters

  • duration?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public fadeToggle(duration?: number, easing?: string, complete?: Function): JQuery

Display or hide the matched elements by animating their opacity.

Parameters

  • duration?: number optional

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

  • easing?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public fadeToggle(duration?: string, easing?: string, complete?: Function): JQuery

Display or hide the matched elements by animating their opacity.

Parameters

  • duration?: string optional

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

  • easing?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public fadeToggle(options: JQueryAnimationOptions): JQuery

Display or hide the matched elements by animating their opacity.

Parameters

Returns

JQuery

public filter(selector: string): JQuery

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

Parameters

  • selector: string

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

Returns

JQuery

public filter(func: (index: number) => any): JQuery

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

Parameters

  • func: (index: number) => any

    A function used as a test for each element in the set. this is the current DOM element.

Returns

JQuery

public filter(element: Element): JQuery

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

Parameters

  • element: Element

    An element to match the current set of elements against.

Returns

JQuery

public filter(obj: JQuery): JQuery

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

Parameters

  • obj: JQuery

    An existing jQuery object to match the current set of elements against.

Returns

JQuery

public find(selector: string): JQuery

Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.

Parameters

  • selector: string

    A string containing a selector expression to match elements against.

Returns

JQuery

public find(element: Element): JQuery

Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.

Parameters

  • element: Element

    An element to match elements against.

Returns

JQuery

public find(obj: JQuery): JQuery

Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.

Parameters

  • obj: JQuery

    A jQuery object to match elements against.

Returns

JQuery

public finish(queue?: string): JQuery

Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements.

Parameters

  • queue?: string optional

    The name of the queue in which to stop animations.

Returns

JQuery

public first(): JQuery

Reduce the set of matched elements to the first in the set.

Returns

JQuery

public focus(): JQuery

Trigger the "focus" event on an element.

Returns

JQuery

public focus(handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "focus" JavaScript event

Parameters

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public focus(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "focus" JavaScript event

Parameters

  • eventData?: any optional

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

  • handler?: (eventObject: JQueryEventObject) => any optional

    A function to execute each time the event is triggered.

Returns

JQuery

public focusin(handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "focusin" JavaScript event

Parameters

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public focusin(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "focusin" JavaScript event

Parameters

  • eventData: Object

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

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public focusout(handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "focusout" JavaScript event

Parameters

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public focusout(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "focusout" JavaScript event

Parameters

  • eventData: Object

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

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public get(index: number): HTMLElement

Retrieve one of the elements matched by the jQuery object.

Parameters

  • index: number

    A zero-based integer indicating which element to retrieve.

Returns

HTMLElement

public get(): Array<any>

Retrieve the elements matched by the jQuery object.

Returns

Array<any>

public has(selector: string): JQuery

Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.

Parameters

  • selector: string

    A string containing a selector expression to match elements against.

Returns

JQuery

public has(contained: Element): JQuery

Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.

Parameters

  • contained: Element

    A DOM element to match elements against.

Returns

JQuery

public hasClass(className: string): boolean

Determine whether any of the matched elements are assigned the given class.

Parameters

  • className: string

    The class name to search for.

Returns

boolean

public height(): number

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

Returns

number

public height(value: number): JQuery

Set the CSS height of every matched element.

Parameters

  • value: number

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

Returns

JQuery

public height(value: string): JQuery

Set the CSS height of every matched element.

Parameters

  • value: string

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

Returns

JQuery

public height(func: (index: number, height: number) => number): JQuery

Set the CSS height of every matched element.

Parameters

  • func: (index: number, height: number) => number

    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

JQuery

public height(func: (index: number, height: string) => string): JQuery

Set the CSS height of every matched element.

Parameters

  • func: (index: number, height: string) => 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

JQuery

public height(func: (index: number, height: string) => number): JQuery

Set the CSS height of every matched element.

Parameters

  • func: (index: number, height: string) => number

    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

JQuery

public height(func: (index: number, height: number) => string): JQuery

Set the CSS height of every matched element.

Parameters

  • func: (index: number, height: number) => 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

JQuery

public hide(duration?: number, complete?: Function): JQuery

Hide the matched elements.

Parameters

  • duration?: number optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public hide(duration?: string, complete?: Function): JQuery

Hide the matched elements.

Parameters

  • duration?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public hide(duration?: number, easing?: string, complete?: Function): JQuery

Hide the matched elements.

Parameters

  • duration?: number optional

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

  • easing?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public hide(duration?: string, easing?: string, complete?: Function): JQuery

Hide the matched elements.

Parameters

  • duration?: string optional

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

  • easing?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public hide(options: JQueryAnimationOptions): JQuery

Hide the matched elements.

Parameters

Returns

JQuery

public highcharts(): HighchartsChartObject

Returns

HighchartsChartObject

public highcharts(options: HighchartsOptions): JQuery

Creates a new Highcharts.Chart for the current JQuery selector; usually a div selected by $('#container')

Parameters

Returns

JQuery

current {JQuery} selector the current JQuery selector

public highcharts(options: HighchartsOptions, callback: (chart: HighchartsChartObject) => void): JQuery

Creates a new Highcharts.Chart for the current JQuery selector; usually a div selected by $('#container')

Parameters

  • options: HighchartsOptions

    Options for this chart

  • callback: (chart: HighchartsChartObject) => void

    Callback function used to manipulate the constructed chart instance

Returns

JQuery

current {JQuery} selector the current JQuery selector

public hover(handlerIn: (eventObject: JQueryEventObject) => any, handlerOut: (eventObject: JQueryEventObject) => any): JQuery

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

Parameters

  • handlerIn: (eventObject: JQueryEventObject) => any

    A function to execute when the mouse pointer enters the element.

  • handlerOut: (eventObject: JQueryEventObject) => any

    A function to execute when the mouse pointer leaves the element.

Returns

JQuery

public hover(handlerInOut: (eventObject: JQueryEventObject) => any): JQuery

Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements.

Parameters

  • handlerInOut: (eventObject: JQueryEventObject) => any

    A function to execute when the mouse pointer enters or leaves the element.

Returns

JQuery

public html(): string

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

Returns

string

public html(htmlString: string): JQuery

Set the HTML contents of each element in the set of matched elements.

Parameters

  • htmlString: string

    A string of HTML to set as the content of each matched element.

Returns

JQuery

public html(func: (index: number, oldhtml: string) => string): JQuery

Set the HTML contents of each element in the set of matched elements.

Parameters

  • func: (index: number, oldhtml: string) => string

    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

JQuery

public index(): number

Search for a given element from among the matched elements.

Returns

number

public index(selector: string): number

Search for a given element from among the matched elements.

Parameters

  • selector: string

    A selector representing a jQuery collection in which to look for an element.

Returns

number

public index(element: JQuery): number

Search for a given element from among the matched elements.

Parameters

  • element: JQuery

    The DOM element or first element within the jQuery object to look for.

Returns

number

public index(element: Element): number

Search for a given element from among the matched elements.

Parameters

  • element: Element

    The DOM element or first element within the jQuery object to look for.

Returns

number

public innerHeight(): number

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

Returns

number

public innerHeight(height: number): JQuery

Sets the inner height on elements in the set of matched elements, including padding but not border.

Parameters

  • height: number

Returns

JQuery

public innerHeight(height: string): JQuery

Sets the inner height on elements in the set of matched elements, including padding but not border.

Parameters

  • height: string

Returns

JQuery

public innerWidth(): number

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

Returns

number

public innerWidth(width: number): JQuery

Sets the inner width on elements in the set of matched elements, including padding but not border.

Parameters

  • width: number

Returns

JQuery

public innerWidth(width: string): JQuery

Sets the inner width on elements in the set of matched elements, including padding but not border.

Parameters

  • width: string

Returns

JQuery

public insertAfter(target: JQuery): JQuery

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

param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter.

Parameters

Returns

JQuery

public insertAfter(target: Array<any>): JQuery

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

param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter.

Parameters

  • target: Array<any>

Returns

JQuery

public insertAfter(target: Element): JQuery

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

param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter.

Parameters

  • target: Element

Returns

JQuery

public insertAfter(target: Text): JQuery

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

param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter.

Parameters

  • target: Text

Returns

JQuery

public insertAfter(target: string): JQuery

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

param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter.

Parameters

  • target: string

Returns

JQuery

public insertBefore(target: JQuery): JQuery

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

param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter.

Parameters

Returns

JQuery

public insertBefore(target: Array<any>): JQuery

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

param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter.

Parameters

  • target: Array<any>

Returns

JQuery

public insertBefore(target: Element): JQuery

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

param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter.

Parameters

  • target: Element

Returns

JQuery

public insertBefore(target: Text): JQuery

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

param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter.

Parameters

  • target: Text

Returns

JQuery

public insertBefore(target: string): JQuery

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

param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter.

Parameters

  • target: string

Returns

JQuery

public is(selector: string): boolean

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.

Parameters

  • selector: string

    A string containing a selector expression to match elements against.

Returns

boolean

public is(func: (index: number) => any): boolean

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.

Parameters

  • func: (index: number) => any

    A function used as a test for the set of elements. It accepts one argument, index, which is the element's index in the jQuery collection.Within the function, this refers to the current DOM element.

Returns

boolean

public is(obj: JQuery): boolean

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.

Parameters

  • obj: JQuery

    An existing jQuery object to match the current set of elements against.

Returns

boolean

public is(elements: any): boolean

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.

Parameters

  • elements: any

    One or more elements to match the current set of elements against.

Returns

boolean

public keydown(): JQuery

Trigger the "keydown" event on an element.

Returns

JQuery

public keydown(handler: (eventObject: JQueryKeyEventObject) => any): JQuery

Bind an event handler to the "keydown" JavaScript event

Parameters

  • handler: (eventObject: JQueryKeyEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public keydown(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery

Bind an event handler to the "keydown" JavaScript event

Parameters

  • eventData?: any optional

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

  • handler?: (eventObject: JQueryKeyEventObject) => any optional

    A function to execute each time the event is triggered.

Returns

JQuery

public keypress(): JQuery

Trigger the "keypress" event on an element.

Returns

JQuery

public keypress(handler: (eventObject: JQueryKeyEventObject) => any): JQuery

Bind an event handler to the "keypress" JavaScript event

Parameters

  • handler: (eventObject: JQueryKeyEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public keypress(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery

Bind an event handler to the "keypress" JavaScript event

Parameters

  • eventData?: any optional

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

  • handler?: (eventObject: JQueryKeyEventObject) => any optional

    A function to execute each time the event is triggered.

Returns

JQuery

public keyup(): JQuery

Trigger the "keyup" event on an element.

Returns

JQuery

public keyup(handler: (eventObject: JQueryKeyEventObject) => any): JQuery

Bind an event handler to the "keyup" JavaScript event

Parameters

  • handler: (eventObject: JQueryKeyEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public keyup(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery

Bind an event handler to the "keyup" JavaScript event

Parameters

  • eventData?: any optional

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

  • handler?: (eventObject: JQueryKeyEventObject) => any optional

    A function to execute each time the event is triggered.

Returns

JQuery

public last(): JQuery

Reduce the set of matched elements to the final one in the set.

Returns

JQuery

public load(url: string, data?: string, complete?: (responseText: string, textStatus: string, XMLHttpRequest: XMLHttpRequest) => any): JQuery

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

Parameters

  • url: string

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

  • data?: string optional

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

  • complete?: (responseText: string, textStatus: string, XMLHttpRequest: XMLHttpRequest) => any optional

    A callback function that is executed when the request completes.

Returns

JQuery

public load(url: string, data?: Object, complete?: (responseText: string, textStatus: string, XMLHttpRequest: XMLHttpRequest) => any): JQuery

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

Parameters

  • url: string

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

  • data?: Object optional

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

  • complete?: (responseText: string, textStatus: string, XMLHttpRequest: XMLHttpRequest) => any optional

    A callback function that is executed when the request completes.

Returns

JQuery

public load(handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "load" JavaScript event.

Parameters

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute when the event is triggered.

Returns

JQuery

public load(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "load" JavaScript event.

Parameters

  • eventData?: any optional

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

  • handler?: (eventObject: JQueryEventObject) => any optional

    A function to execute when the event is triggered.

Returns

JQuery

public map(callback: (index: number, domElement: Element) => any): JQuery

Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.

Parameters

  • callback: (index: number, domElement: Element) => any

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

Returns

JQuery

public mousedown(): JQuery

Trigger the "mousedown" event on an element.

Returns

JQuery

public mousedown(handler: (eventObject: JQueryMouseEventObject) => any): JQuery

Bind an event handler to the "mousedown" JavaScript event.

Parameters

  • handler: (eventObject: JQueryMouseEventObject) => any

    A function to execute when the event is triggered.

Returns

JQuery

public mousedown(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery

Bind an event handler to the "mousedown" JavaScript event.

Parameters

  • eventData: Object

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

  • handler: (eventObject: JQueryMouseEventObject) => any

    A function to execute when the event is triggered.

Returns

JQuery

public mouseenter(): JQuery

Trigger the "mouseenter" event on an element.

Returns

JQuery

public mouseenter(handler: (eventObject: JQueryMouseEventObject) => any): JQuery

Bind an event handler to be fired when the mouse enters an element.

Parameters

  • handler: (eventObject: JQueryMouseEventObject) => any

    A function to execute when the event is triggered.

Returns

JQuery

public mouseenter(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery

Bind an event handler to be fired when the mouse enters an element.

Parameters

  • eventData: Object

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

  • handler: (eventObject: JQueryMouseEventObject) => any

    A function to execute when the event is triggered.

Returns

JQuery

public mouseleave(): JQuery

Trigger the "mouseleave" event on an element.

Returns

JQuery

public mouseleave(handler: (eventObject: JQueryMouseEventObject) => any): JQuery

Bind an event handler to be fired when the mouse leaves an element.

Parameters

  • handler: (eventObject: JQueryMouseEventObject) => any

    A function to execute when the event is triggered.

Returns

JQuery

public mouseleave(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery

Bind an event handler to be fired when the mouse leaves an element.

Parameters

  • eventData: Object

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

  • handler: (eventObject: JQueryMouseEventObject) => any

    A function to execute when the event is triggered.

Returns

JQuery

public mousemove(): JQuery

Trigger the "mousemove" event on an element.

Returns

JQuery

public mousemove(handler: (eventObject: JQueryMouseEventObject) => any): JQuery

Bind an event handler to the "mousemove" JavaScript event.

Parameters

  • handler: (eventObject: JQueryMouseEventObject) => any

    A function to execute when the event is triggered.

Returns

JQuery

public mousemove(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery

Bind an event handler to the "mousemove" JavaScript event.

Parameters

  • eventData: Object

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

  • handler: (eventObject: JQueryMouseEventObject) => any

    A function to execute when the event is triggered.

Returns

JQuery

public mouseout(): JQuery

Trigger the "mouseout" event on an element.

Returns

JQuery

public mouseout(handler: (eventObject: JQueryMouseEventObject) => any): JQuery

Bind an event handler to the "mouseout" JavaScript event.

Parameters

  • handler: (eventObject: JQueryMouseEventObject) => any

    A function to execute when the event is triggered.

Returns

JQuery

public mouseout(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery

Bind an event handler to the "mouseout" JavaScript event.

Parameters

  • eventData: Object

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

  • handler: (eventObject: JQueryMouseEventObject) => any

    A function to execute when the event is triggered.

Returns

JQuery

public mouseover(): JQuery

Trigger the "mouseover" event on an element.

Returns

JQuery

public mouseover(handler: (eventObject: JQueryMouseEventObject) => any): JQuery

Bind an event handler to the "mouseover" JavaScript event.

Parameters

  • handler: (eventObject: JQueryMouseEventObject) => any

    A function to execute when the event is triggered.

Returns

JQuery

public mouseover(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery

Bind an event handler to the "mouseover" JavaScript event.

Parameters

  • eventData: Object

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

  • handler: (eventObject: JQueryMouseEventObject) => any

    A function to execute when the event is triggered.

Returns

JQuery

public mouseup(): JQuery

Trigger the "mouseup" event on an element.

Returns

JQuery

public mouseup(handler: (eventObject: JQueryMouseEventObject) => any): JQuery

Bind an event handler to the "mouseup" JavaScript event.

Parameters

  • handler: (eventObject: JQueryMouseEventObject) => any

    A function to execute when the event is triggered.

Returns

JQuery

public mouseup(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery

Bind an event handler to the "mouseup" JavaScript event.

Parameters

  • eventData: Object

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

  • handler: (eventObject: JQueryMouseEventObject) => any

    A function to execute when the event is triggered.

Returns

JQuery

public next(selector?: string): JQuery

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.

Parameters

  • selector?: string optional

    A string containing a selector expression to match elements against.

Returns

JQuery

public nextAll(selector?: string): JQuery

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

Parameters

  • selector?: string optional

    A string containing a selector expression to match elements against.

Returns

JQuery

public nextUntil(selector?: string, filter?: string): JQuery

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

Parameters

  • selector?: string optional

    A string containing a selector expression to indicate where to stop matching following sibling elements.

  • filter?: string optional

    A string containing a selector expression to match elements against.

Returns

JQuery

public nextUntil(element?: Element, filter?: string): JQuery

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

Parameters

  • element?: Element optional

    A DOM node or jQuery object indicating where to stop matching following sibling elements.

  • filter?: string optional

    A string containing a selector expression to match elements against.

Returns

JQuery

public nextUntil(obj?: JQuery, filter?: string): JQuery

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

Parameters

  • obj?: JQuery optional

    A DOM node or jQuery object indicating where to stop matching following sibling elements.

  • filter?: string optional

    A string containing a selector expression to match elements against.

Returns

JQuery

public not(selector: string): JQuery

Remove elements from the set of matched elements.

Parameters

  • selector: string

    A string containing a selector expression to match elements against.

Returns

JQuery

public not(func: (index: number) => any): JQuery

Remove elements from the set of matched elements.

Parameters

  • func: (index: number) => any

    A function used as a test for each element in the set. this is the current DOM element.

Returns

JQuery

public not(elements?: Array<Element>): JQuery

Remove elements from the set of matched elements.

Parameters

  • elements?: Array<Element> optional

    One or more DOM elements to remove from the matched set.

Returns

JQuery

public not(obj: JQuery): JQuery

Remove elements from the set of matched elements.

Parameters

  • obj: JQuery

    An existing jQuery object to match the current set of elements against.

Returns

JQuery

public off(): JQuery

Remove an event handler.

Returns

JQuery

public off(events: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery

Remove an event handler.

Parameters

  • events: string

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

  • selector?: string optional

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

  • handler?: (eventObject: JQueryEventObject) => any optional

    A handler function previously attached for the event(s), or the special value false.

Returns

JQuery

public off(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery

Remove an event handler.

Parameters

  • events: string

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

  • handler: (eventObject: JQueryEventObject) => any

    A handler function previously attached for the event(s), or the special value false.

Returns

JQuery

public off(events: { [key: string]: any; }, selector?: string): JQuery

Remove an event handler.

Parameters

  • events: { [key: string]: any; }

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

  • selector?: string optional

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

Returns

JQuery

public offset(): JQueryCoordinates

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

Returns

JQueryCoordinates

public offset(coordinates: JQueryCoordinates): JQuery

An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.

Parameters

  • coordinates: JQueryCoordinates

    An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.

Returns

JQuery

public offset(func: (index: number, coords: JQueryCoordinates) => JQueryCoordinates): JQuery

An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.

Parameters

  • func: (index: number, coords: JQueryCoordinates) => JQueryCoordinates

    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

JQuery

public offsetParent(): JQuery

Get the closest ancestor element that is positioned.

Returns

JQuery

public on(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery

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

Parameters

  • events: string

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

  • handler: (eventObject: JQueryEventObject, ...args: any[]) => any

    A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. Rest parameter args is for optional parameters passed to jQuery.trigger(). Note that the actual parameters on the event handler function must be marked as optional (? syntax).

Returns

JQuery

public on(events: string, data: any, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery

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

Parameters

  • events: string

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

  • data: any

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

  • handler: (eventObject: JQueryEventObject, ...args: any[]) => any

    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

JQuery

public on(events: string, selector: string, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery

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

Parameters

  • events: string

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

  • selector: string

    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: (eventObject: JQueryEventObject, ...eventData: any[]) => any

    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

JQuery

public on(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery

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

Parameters

  • events: string

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

  • selector: string

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

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

  • handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any

    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

JQuery

public on(events: { [key: string]: any; }, selector?: any, data?: any): JQuery

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

Parameters

  • events: { [key: string]: any; }

    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?: any optional

    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?: any optional

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

Returns

JQuery

public one(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery

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

Parameters

  • events: string

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

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute at the time the event is triggered.

Returns

JQuery

public one(events: string, data: Object, handler: (eventObject: JQueryEventObject) => any): JQuery

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

Parameters

  • events: string

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

  • data: Object

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

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute at the time the event is triggered.

Returns

JQuery

public one(events: string, selector: string, handler: (eventObject: JQueryEventObject) => any): JQuery

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

Parameters

  • events: string

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

  • selector: string

    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: (eventObject: JQueryEventObject) => any

    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

JQuery

public one(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject) => any): JQuery

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

Parameters

  • events: string

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

  • selector: string

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

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

  • handler: (eventObject: JQueryEventObject) => any

    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

JQuery

public one(events: { [key: string]: any; }, selector?: string, data?: any): JQuery

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

Parameters

  • events: { [key: string]: any; }

    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?: string optional

    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?: any optional

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

Returns

JQuery

public outerHeight(includeMargin?: boolean): number

Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns an integer (without "px") representation of the value or null if called on an empty set of elements.

Parameters

  • includeMargin?: boolean optional

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

Returns

number

public outerHeight(height: number): JQuery

Sets the outer height on elements in the set of matched elements, including padding and border.

Parameters

  • height: number

Returns

JQuery

public outerHeight(height: string): JQuery

Sets the outer height on elements in the set of matched elements, including padding and border.

Parameters

  • height: string

Returns

JQuery

public outerWidth(includeMargin?: boolean): number

Get the current computed width for the first element in the set of matched elements, including padding and border.

Parameters

  • includeMargin?: boolean optional

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

Returns

number

public outerWidth(width: number): JQuery

Sets the outer width on elements in the set of matched elements, including padding and border.

Parameters

  • width: number

Returns

JQuery

public outerWidth(width: string): JQuery

Sets the outer width on elements in the set of matched elements, including padding and border.

Parameters

  • width: string

Returns

JQuery

public parent(selector?: string): JQuery

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

Parameters

  • selector?: string optional

    A string containing a selector expression to match elements against.

Returns

JQuery

public parents(selector?: string): JQuery

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

Parameters

  • selector?: string optional

    A string containing a selector expression to match elements against.

Returns

JQuery

public parentsUntil(selector?: string, filter?: string): JQuery

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.

Parameters

  • selector?: string optional

    A string containing a selector expression to indicate where to stop matching ancestor elements.

  • filter?: string optional

    A string containing a selector expression to match elements against.

Returns

JQuery

public parentsUntil(element?: Element, filter?: string): JQuery

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.

Parameters

  • element?: Element optional

    A DOM node or jQuery object indicating where to stop matching ancestor elements.

  • filter?: string optional

    A string containing a selector expression to match elements against.

Returns

JQuery

public parentsUntil(obj?: JQuery, filter?: string): JQuery

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.

Parameters

  • obj?: JQuery optional

    A DOM node or jQuery object indicating where to stop matching ancestor elements.

  • filter?: string optional

    A string containing a selector expression to match elements against.

Returns

JQuery

public position(): JQueryCoordinates

Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.

Returns

JQueryCoordinates

public prepend(content1: JQuery, content2?: Array<any>): JQuery

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

param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements.

Parameters

  • content1: JQuery
  • content2?: Array<any> optional

Returns

JQuery

public prepend(content1: Array<any>, content2?: Array<any>): JQuery

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

param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements.

Parameters

  • content1: Array<any>
  • content2?: Array<any> optional

Returns

JQuery

public prepend(content1: Element, content2?: Array<any>): JQuery

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

param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements.

Parameters

  • content1: Element
  • content2?: Array<any> optional

Returns

JQuery

public prepend(content1: Text, content2?: Array<any>): JQuery

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

param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements.

Parameters

  • content1: Text
  • content2?: Array<any> optional

Returns

JQuery

public prepend(content1: string, content2?: Array<any>): JQuery

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

param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements.

Parameters

  • content1: string
  • content2?: Array<any> optional

Returns

JQuery

public prepend(func: (index: number, html: string) => any): JQuery

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

param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.

Parameters

  • func: (index: number, html: string) => any

Returns

JQuery

public prependTo(target: JQuery): JQuery

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

Parameters

  • target: 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

JQuery

public prependTo(target: Array<any>): JQuery

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

Parameters

  • target: Array<any>

    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

JQuery

public prependTo(target: Element): JQuery

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

Parameters

  • target: Element

    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

JQuery

public prependTo(target: string): JQuery

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

Parameters

  • target: string

    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

JQuery

public prev(selector?: string): JQuery

Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector.

Parameters

  • selector?: string optional

    A string containing a selector expression to match elements against.

Returns

JQuery

public prevAll(selector?: string): JQuery

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

Parameters

  • selector?: string optional

    A string containing a selector expression to match elements against.

Returns

JQuery

public prevUntil(selector?: string, filter?: string): JQuery

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

Parameters

  • selector?: string optional

    A string containing a selector expression to indicate where to stop matching preceding sibling elements.

  • filter?: string optional

    A string containing a selector expression to match elements against.

Returns

JQuery

public prevUntil(element?: Element, filter?: string): JQuery

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

Parameters

  • element?: Element optional

    A DOM node or jQuery object indicating where to stop matching preceding sibling elements.

  • filter?: string optional

    A string containing a selector expression to match elements against.

Returns

JQuery

public prevUntil(obj?: JQuery, filter?: string): JQuery

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

Parameters

  • obj?: JQuery optional

    A DOM node or jQuery object indicating where to stop matching preceding sibling elements.

  • filter?: string optional

    A string containing a selector expression to match elements against.

Returns

JQuery

public promise(type?: string, target?: Object): JQueryPromise

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

Parameters

  • type?: string optional

    The type of queue that needs to be observed. (default: fx)

  • target?: Object optional

    Object onto which the promise methods have to be attached

Returns

JQueryPromise

public prop(propertyName: string): any

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

Parameters

  • propertyName: string

    The name of the property to get.

Returns

any

public prop(propertyName: string, value: string): JQuery

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

Parameters

  • propertyName: string

    The name of the property to set.

  • value: string

    A value to set for the property.

Returns

JQuery

public prop(propertyName: string, value: number): JQuery

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

Parameters

  • propertyName: string

    The name of the property to set.

  • value: number

    A value to set for the property.

Returns

JQuery

public prop(propertyName: string, value: boolean): JQuery

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

Parameters

  • propertyName: string

    The name of the property to set.

  • value: boolean

    A value to set for the property.

Returns

JQuery

public prop(properties: Object): JQuery

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

Parameters

  • properties: Object

    An object of property-value pairs to set.

Returns

JQuery

public prop(propertyName: string, func: (index: number, oldPropertyValue: any) => any): JQuery

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

Parameters

  • propertyName: string

    The name of the property to set.

  • func: (index: number, oldPropertyValue: any) => any

    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.

Returns

JQuery

public pushStack(elements: Array<any>): JQuery

Add a collection of DOM elements onto the jQuery stack.

Parameters

  • elements: Array<any>

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

Returns

JQuery

public pushStack(elements: Array<any>, name: string, arguments: Array<any>): JQuery

Add a collection of DOM elements onto the jQuery stack.

Parameters

  • elements: Array<any>

    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.

  • arguments: Array<any>

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

Returns

JQuery

public queue(queueName?: string): Array<any>

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

Parameters

  • queueName?: string optional

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

Returns

Array<any>

public queue(newQueue: Array<Function>): JQuery

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

Parameters

  • newQueue: Array<Function>

    An array of functions to replace the current queue contents.

Returns

JQuery

public queue(callback: Function): JQuery

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

Parameters

  • callback: Function

    The new function to add to the queue, with a function to call that will dequeue the next item.

Returns

JQuery

public queue(queueName: string, newQueue: Array<Function>): JQuery

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

Parameters

  • queueName: string

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

  • newQueue: Array<Function>

    An array of functions to replace the current queue contents.

Returns

JQuery

public queue(queueName: string, callback: Function): JQuery

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

Parameters

  • queueName: string

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

  • callback: Function

    The new function to add to the queue, with a function to call that will dequeue the next item.

Returns

JQuery

public ready(handler: Function): JQuery

Specify a function to execute when the DOM is fully loaded.

Parameters

  • handler: Function

    A function to execute after the DOM is ready.

Returns

JQuery

public remove(selector?: string): JQuery

Remove the set of matched elements from the DOM.

Parameters

  • selector?: string optional

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

Returns

JQuery

public removeAttr(attributeName: string): JQuery

Remove an attribute from each element in the set of matched elements.

Parameters

  • attributeName: string

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

Returns

JQuery

public removeClass(className?: string): JQuery

Remove a single class, multiple classes, or all classes from each element in the set of matched elements.

Parameters

  • className?: string optional

    One or more space-separated classes to be removed from the class attribute of each matched element.

Returns

JQuery

public removeClass(func: (index: number, className: string) => string): JQuery

Remove a single class, multiple classes, or all classes from each element in the set of matched elements.

Parameters

  • func: (index: number, className: string) => string

Returns

JQuery

public removeData(name: string): JQuery

Remove a previously-stored piece of data.

Parameters

  • name: string

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

Returns

JQuery

public removeData(list: Array<string>): JQuery

Remove a previously-stored piece of data.

Parameters

  • list: Array<string>

    An array of strings naming the pieces of data to delete.

Returns

JQuery

public removeProp(propertyName: string): JQuery

Remove a property for the set of matched elements.

Parameters

  • propertyName: string

    The name of the property to remove.

Returns

JQuery

public replaceAll(target: JQuery): JQuery

Replace each target element with the set of matched elements.

Parameters

  • target: JQuery

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

Returns

JQuery

public replaceAll(target: Array<any>): JQuery

Replace each target element with the set of matched elements.

Parameters

  • target: Array<any>

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

Returns

JQuery

public replaceAll(target: Element): JQuery

Replace each target element with the set of matched elements.

Parameters

  • target: Element

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

Returns

JQuery

public replaceAll(target: string): JQuery

Replace each target element with the set of matched elements.

Parameters

  • target: string

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

Returns

JQuery

public replaceWith(newContent: JQuery): JQuery

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

param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object.

Parameters

Returns

JQuery

public replaceWith(newContent: Array<any>): JQuery

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

param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object.

Parameters

  • newContent: Array<any>

Returns

JQuery

public replaceWith(newContent: Element): JQuery

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

param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object.

Parameters

  • newContent: Element

Returns

JQuery

public replaceWith(newContent: Text): JQuery

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

param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object.

Parameters

  • newContent: Text

Returns

JQuery

public replaceWith(newContent: string): JQuery

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

param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object.

Parameters

  • newContent: string

Returns

JQuery

public replaceWith(func: () => any): JQuery

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

param func A function that returns content with which to replace the set of matched elements.

Parameters

  • func: () => any

Returns

JQuery

public resize(): JQuery

Trigger the "resize" event on an element.

Returns

JQuery

public resize(handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "resize" JavaScript event.

Parameters

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public resize(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "resize" JavaScript event.

Parameters

  • eventData: Object

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

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public scroll(): JQuery

Trigger the "scroll" event on an element.

Returns

JQuery

public scroll(handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "scroll" JavaScript event.

Parameters

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public scroll(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "scroll" JavaScript event.

Parameters

  • eventData: Object

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

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public scrollLeft(): number

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

Returns

number

public scrollLeft(value: number): JQuery

Set the current horizontal position of the scroll bar for each of the set of matched elements.

Parameters

  • value: number

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

Returns

JQuery

public scrollTop(): number

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.

Returns

number

public scrollTop(value: number): JQuery

Set the current vertical position of the scroll bar for each of the set of matched elements.

Parameters

  • value: number

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

Returns

JQuery

public select(): JQuery

Trigger the "select" event on an element.

Returns

JQuery

public select(handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "select" JavaScript event.

Parameters

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public select(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "select" JavaScript event.

Parameters

  • eventData: Object

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

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public serialize(): string

Encode a set of form elements as a string for submission.

Returns

string

public serializeArray(): Array<Object>

Encode a set of form elements as an array of names and values.

Returns

Array<Object>

public show(duration?: number, complete?: Function): JQuery

Display the matched elements.

Parameters

  • duration?: number optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public show(duration?: string, complete?: Function): JQuery

Display the matched elements.

Parameters

  • duration?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public show(duration?: number, easing?: string, complete?: Function): JQuery

Display the matched elements.

Parameters

  • duration?: number optional

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

  • easing?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public show(duration?: string, easing?: string, complete?: Function): JQuery

Display the matched elements.

Parameters

  • duration?: string optional

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

  • easing?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public show(options: JQueryAnimationOptions): JQuery

Display the matched elements.

Parameters

Returns

JQuery

public siblings(selector?: string): JQuery

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

Parameters

  • selector?: string optional

    A string containing a selector expression to match elements against.

Returns

JQuery

public slice(start: number, end?: number): JQuery

Reduce the set of matched elements to a subset specified by a range of indices.

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.

  • end?: number optional

    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

JQuery

public slideDown(duration?: number, complete?: Function): JQuery

Display the matched elements with a sliding motion.

Parameters

  • duration?: number optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public slideDown(duration?: string, complete?: Function): JQuery

Display the matched elements with a sliding motion.

Parameters

  • duration?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public slideDown(duration?: number, easing?: string, complete?: Function): JQuery

Display the matched elements with a sliding motion.

Parameters

  • duration?: number optional

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

  • easing?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public slideDown(duration?: string, easing?: string, complete?: Function): JQuery

Display the matched elements with a sliding motion.

Parameters

  • duration?: string optional

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

  • easing?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public slideDown(options: JQueryAnimationOptions): JQuery

Display the matched elements with a sliding motion.

Parameters

Returns

JQuery

public slideToggle(duration?: number, complete?: Function): JQuery

Display or hide the matched elements with a sliding motion.

Parameters

  • duration?: number optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public slideToggle(duration?: string, complete?: Function): JQuery

Display or hide the matched elements with a sliding motion.

Parameters

  • duration?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public slideToggle(duration?: number, easing?: string, complete?: Function): JQuery

Display or hide the matched elements with a sliding motion.

Parameters

  • duration?: number optional

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

  • easing?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public slideToggle(duration?: string, easing?: string, complete?: Function): JQuery

Display or hide the matched elements with a sliding motion.

Parameters

  • duration?: string optional

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

  • easing?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public slideToggle(options: JQueryAnimationOptions): JQuery

Display or hide the matched elements with a sliding motion.

Parameters

Returns

JQuery

public slideUp(duration?: number, complete?: Function): JQuery

Hide the matched elements with a sliding motion.

Parameters

  • duration?: number optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public slideUp(duration?: string, complete?: Function): JQuery

Hide the matched elements with a sliding motion.

Parameters

  • duration?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public slideUp(duration?: number, easing?: string, complete?: Function): JQuery

Hide the matched elements with a sliding motion.

Parameters

  • duration?: number optional

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

  • easing?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public slideUp(duration?: string, easing?: string, complete?: Function): JQuery

Hide the matched elements with a sliding motion.

Parameters

  • duration?: string optional

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

  • easing?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public slideUp(options: JQueryAnimationOptions): JQuery

Hide the matched elements with a sliding motion.

Parameters

Returns

JQuery

public stop(clearQueue?: boolean, jumpToEnd?: boolean): JQuery

Stop the currently-running animation on the matched elements.

Parameters

  • clearQueue?: boolean optional

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

  • jumpToEnd?: boolean optional

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

Returns

JQuery

public stop(queue?: string, clearQueue?: boolean, jumpToEnd?: boolean): JQuery

Stop the currently-running animation on the matched elements.

Parameters

  • queue?: string optional

    The name of the queue in which to stop animations.

  • clearQueue?: boolean optional

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

  • jumpToEnd?: boolean optional

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

Returns

JQuery

public submit(): JQuery

Trigger the "submit" event on an element.

Returns

JQuery

public submit(handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "submit" JavaScript event

Parameters

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute each time the event is triggered.

Returns

JQuery

public submit(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "submit" JavaScript event

Parameters

  • eventData?: any optional

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

  • handler?: (eventObject: JQueryEventObject) => any optional

    A function to execute each time the event is triggered.

Returns

JQuery

public text(): string

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

Returns

string

public text(text: string): JQuery

Set the content of each element in the set of matched elements to the specified text.

Parameters

  • text: string

    The text to set as the content of each matched element.

Returns

JQuery

public text(text: number): JQuery

Set the content of each element in the set of matched elements to the specified text.

Parameters

  • text: number

    The text to set as the content of each matched element.

Returns

JQuery

public text(text: boolean): JQuery

Set the content of each element in the set of matched elements to the specified text.

Parameters

  • text: boolean

    The text to set as the content of each matched element.

Returns

JQuery

public text(func: (index: number, text: string) => string): JQuery

Set the content of each element in the set of matched elements to the specified text.

Parameters

  • func: (index: number, text: string) => string

    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

JQuery

public toArray(): Array<any>

Retrieve all the elements contained in the jQuery set, as an array.

Returns

Array<any>

public toggle(duration?: number, complete?: Function): JQuery

Display or hide the matched elements.

Parameters

  • duration?: number optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public toggle(duration?: string, complete?: Function): JQuery

Display or hide the matched elements.

Parameters

  • duration?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public toggle(duration?: number, easing?: string, complete?: Function): JQuery

Display or hide the matched elements.

Parameters

  • duration?: number optional

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

  • easing?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public toggle(duration?: string, easing?: string, complete?: Function): JQuery

Display or hide the matched elements.

Parameters

  • duration?: string optional

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

  • easing?: string optional

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

  • complete?: Function optional

    A function to call once the animation is complete.

Returns

JQuery

public toggle(options: JQueryAnimationOptions): JQuery

Display or hide the matched elements.

Parameters

Returns

JQuery

public toggle(showOrHide: boolean): JQuery

Display or hide the matched elements.

Parameters

  • showOrHide: boolean

    A Boolean indicating whether to show or hide the elements.

Returns

JQuery

public toggleClass(className: string, swtch?: boolean): JQuery

Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.

Parameters

  • className: string

    One or more class names (separated by spaces) to be toggled for each element in the matched set.

  • swtch?: boolean optional

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

Returns

JQuery

public toggleClass(swtch?: boolean): JQuery

Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.

Parameters

  • swtch?: boolean optional

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

Returns

JQuery

public toggleClass(func: (index: number, className: string, swtch: boolean) => string, swtch?: boolean): JQuery

Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.

Parameters

  • func: (index: number, className: string, swtch: boolean) => string

    A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the switch as arguments.

  • swtch?: boolean optional

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

Returns

JQuery

public trigger(eventType: string, extraParameters?: Array<any>): JQuery

Execute all handlers and behaviors attached to the matched elements for the given event type.

Parameters

  • eventType: string

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

  • extraParameters?: Array<any> optional

    Additional parameters to pass along to the event handler.

Returns

JQuery

public trigger(eventType: string, extraParameters?: Object): JQuery

Execute all handlers and behaviors attached to the matched elements for the given event type.

Parameters

  • eventType: string

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

  • extraParameters?: Object optional

    Additional parameters to pass along to the event handler.

Returns

JQuery

public trigger(event: JQueryEventObject, extraParameters?: Array<any>): JQuery

Execute all handlers and behaviors attached to the matched elements for the given event type.

Parameters

  • event: JQueryEventObject

    A jQuery.Event object.

  • extraParameters?: Array<any> optional

    Additional parameters to pass along to the event handler.

Returns

JQuery

public trigger(event: JQueryEventObject, extraParameters?: Object): JQuery

Execute all handlers and behaviors attached to the matched elements for the given event type.

Parameters

  • event: JQueryEventObject

    A jQuery.Event object.

  • extraParameters?: Object optional

    Additional parameters to pass along to the event handler.

Returns

JQuery

public triggerHandler(eventType: string, extraParameters?: Array<any>): Object

Execute all handlers attached to an element for an event.

Parameters

  • eventType: string

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

  • extraParameters?: Array<any> optional

    An array of additional parameters to pass along to the event handler.

Returns

Object

public unbind(eventType?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery

Remove a previously-attached event handler from the elements.

Parameters

  • eventType?: string optional

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

  • handler?: (eventObject: JQueryEventObject) => any optional

    The function that is to be no longer executed.

Returns

JQuery

public unbind(eventType: string, fls: boolean): JQuery

Remove a previously-attached event handler from the elements.

Parameters

  • eventType: string

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

  • fls: boolean

    Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ).

Returns

JQuery

public unbind(evt: any): JQuery

Remove a previously-attached event handler from the elements.

Parameters

  • evt: any

    A JavaScript event object as passed to an event handler.

Returns

JQuery

public undelegate(): JQuery

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

Returns

JQuery

public undelegate(selector: string, eventType: string, handler?: (eventObject: JQueryEventObject) => any): JQuery

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

Parameters

  • selector: string

    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?: (eventObject: JQueryEventObject) => any optional

    A function to execute at the time the event is triggered.

Returns

JQuery

public undelegate(selector: string, events: Object): JQuery

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

Parameters

  • selector: string

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

  • events: Object

    An object of one or more event types and previously bound functions to unbind from them.

Returns

JQuery

public undelegate(namespace: string): JQuery

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

Parameters

  • namespace: string

    A string containing a namespace to unbind all events from.

Returns

JQuery

public unload(handler: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8)

Parameters

  • handler: (eventObject: JQueryEventObject) => any

    A function to execute when the event is triggered.

Returns

JQuery

public unload(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery

Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8)

Parameters

  • eventData?: any optional

    A plain object of data that will be passed to the event handler.

  • handler?: (eventObject: JQueryEventObject) => any optional

    A function to execute when the event is triggered.

Returns

JQuery

public unwrap(): JQuery

Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.

Returns

JQuery

public val(): any

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

Returns

any

public val(value: string): JQuery

Set the value of each element in the set of matched elements.

Parameters

  • value: string

    A string of text or an array of strings corresponding to the value of each matched element to set as selected/checked.

Returns

JQuery

public val(value: Array<string>): JQuery

Set the value of each element in the set of matched elements.

Parameters

  • value: Array<string>

    A string of text or an array of strings corresponding to the value of each matched element to set as selected/checked.

Returns

JQuery

public val(func: (index: number, value: string) => string): JQuery

Set the value of each element in the set of matched elements.

Parameters

  • func: (index: number, value: string) => string

    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

JQuery

public val(func: (index: number, value: string[]) => string): JQuery

Set the value of each element in the set of matched elements.

Parameters

  • func: (index: number, value: string[]) => string

    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

JQuery

public val(func: (index: number, value: number) => string): JQuery

Set the value of each element in the set of matched elements.

Parameters

  • func: (index: number, value: number) => string

    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

JQuery

public val(func: (index: number, value: string) => string[]): JQuery

Set the value of each element in the set of matched elements.

Parameters

  • func: (index: number, value: string) => string[]

    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

JQuery

public val(func: (index: number, value: string[]) => string[]): JQuery

Set the value of each element in the set of matched elements.

Parameters

  • func: (index: number, value: string[]) => string[]

    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

JQuery

public val(func: (index: number, value: number) => string[]): JQuery

Set the value of each element in the set of matched elements.

Parameters

  • func: (index: number, value: number) => string[]

    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

JQuery

public width(): number

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

Returns

number

public width(value: number): JQuery

Set the CSS width of each element in the set of matched elements.

Parameters

  • value: number

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

Returns

JQuery

public width(value: string): JQuery

Set the CSS width of each element in the set of matched elements.

Parameters

  • value: string

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

Returns

JQuery

public width(func: (index: number, width: number) => number): JQuery

Set the CSS width of each element in the set of matched elements.

Parameters

  • func: (index: number, width: number) => number

    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

JQuery

public width(func: (index: number, width: string) => string): JQuery

Set the CSS width of each element in the set of matched elements.

Parameters

  • func: (index: number, width: string) => 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

JQuery

public width(func: (index: number, width: string) => number): JQuery

Set the CSS width of each element in the set of matched elements.

Parameters

  • func: (index: number, width: string) => number

    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

JQuery

public width(func: (index: number, width: number) => string): JQuery

Set the CSS width of each element in the set of matched elements.

Parameters

  • func: (index: number, width: number) => 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

JQuery

public wrap(wrappingElement: JQuery): JQuery

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

Parameters

  • wrappingElement: JQuery

    A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.

Returns

JQuery

public wrap(wrappingElement: Element): JQuery

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

Parameters

  • wrappingElement: Element

    A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.

Returns

JQuery

public wrap(wrappingElement: string): JQuery

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

Parameters

  • wrappingElement: string

    A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.

Returns

JQuery

public wrap(func: (index: number) => any): JQuery

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

Parameters

  • func: (index: number) => any

    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

JQuery

public wrapAll(wrappingElement: JQuery): JQuery

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

Parameters

  • wrappingElement: JQuery

    A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.

Returns

JQuery

public wrapAll(wrappingElement: Element): JQuery

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

Parameters

  • wrappingElement: Element

    A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.

Returns

JQuery

public wrapAll(wrappingElement: string): JQuery

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

Parameters

  • wrappingElement: string

    A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.

Returns

JQuery

public wrapInner(wrappingElement: JQuery): JQuery

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

Parameters

  • wrappingElement: JQuery

    An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements.

Returns

JQuery

public wrapInner(wrappingElement: Element): JQuery

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

Parameters

  • wrappingElement: Element

    An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements.

Returns

JQuery

public wrapInner(wrappingElement: string): JQuery

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

Parameters

  • wrappingElement: string

    An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements.

Returns

JQuery

public wrapInner(func: (index: number) => any): JQuery

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

Parameters

  • func: (index: number) => any

    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

JQuery