Interface JSTree

The jQuery instance members

Hierarchy

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 activate_node: (obj: any, e: any) => any

public can_paste: () => boolean

check if there is something in the buffer to paste

name

can_paste()

returns

public clear_search: () => void

used to clear the last search (removes classes and shows all nodes if filtering is on)

name

clear_search()

plugin

search

trigger

clear_search.jstree

public clear_state: () => void

clear the state on the user's computer

name

clear_state()

plugin

state

public close_all: (obj?: any, animation?: number) => void

closes all nodes within a node (or the tree), revaling their children

name

close_all([obj, animation])

param

the node to close recursively, omit to close all nodes in the tree

param

the animation duration in milliseconds when closing the nodes, the default is no animation

trigger

close_all.jstree

public close_node: (obj: any, animation?: any) => void

closes a node, hiding its children

name

close_node(obj [, animation])

param

the node to close

param

the animation duration in milliseconds when closing the node (overrides the core.animation setting). Use false for no animation.

trigger

close_node.jstree, after_close.jstree

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 copy: (obj: any) => void

copy a node (a later call to paste(obj) would copy the node)

name

copy(obj)

param

multiple objects can be passed using an array

trigger

copy.jstre

public copy_node: (obj: any, par: any, pos?: any, callback?: any, internal?: boolean) => void

copy a node to a new parent

name

copy_node(obj, par [, pos, callback, is_loaded])

param

the node to copy, pass an array to copy multiple nodes

param

the new parent

param

the position to insert at (besides integer values, "first" and "last" are supported, as well as "before" and "after"), defaults to integer 0

param

a function to call once the move is completed, receives 3 arguments - the node, the new parent and the position

param

parameter indicating if the parent node has been loaded

trigger

model.jstree copy_node.jstree

public create_node: (obj?: any, node?: any, pos?: any, callback?: any, is_loaded?: boolean) => string

create a new node (do not confuse with load_node)

name

create_node([obj, node, pos, callback, is_loaded])

param

the parent node (to create a root node use either "#" (string) or null)

param

the data for the new node (a valid JSON object, or a simple string with the name)

param

the index at which to insert the node, "first" and "last" are also supported, default is "last"

param

a function to be called once the node is created

param

internal argument indicating if the parent node was succesfully loaded

returns

the ID of the newly create node

trigger

model.jstree, create_node.jstree

public cut: (obj: any) => void

cut a node (a later call to paste(obj) would move the node)

name

cut(obj)

param

multiple objects can be passed using an array

trigger

cut.jstree

public delete_node: (obj: any) => boolean

remove a node

name

delete_node(obj)

param

the node, you can pass an array to delete multiple nodes

returns
trigger

delete_node.jstree, changed.jstree

public deselect_all: (supress_event?: boolean) => void

deselect all selected nodes

name

deselect_all([supress_event])

param

if set to true the changed.jstree event won't be triggered

trigger

deselect_all.jstree, changed.jstree

public deselect_node: (obj: any, supress_event?: boolean, e?: any) => void

deselect a node

name

deselect_node(obj [, supress_event])

param

an array can be used to deselect multiple nodes

param

if set to true the changed.jstree event won't be triggered

trigger

deselect_node.jstree, changed.jstree

public destroy: (keep_html?: boolean) => void

destroy an instance

name

destroy()

param

if not set to true the container will be emptied, otherwise the current DOM elements will be kept intact

public disable_node: (obj: any) => boolean

disables a node - so that it can not be selected

name

disable_node(obj)

param

the node to disable

trigger

disable_node.jstree

public edit: (obj: any, default_text?: string) => void

put a node in edit mode (input field to rename the node)

name

edit(obj [, default_text])

param
param

the text to populate the input with (if omitted the node text value is used)

public enable_node: (obj: any) => boolean

enables a node - so that it can be selected

name

enable_node(obj)

param

the node to enable

trigger

enable_node.jstree

public get_bottom_selected: (full?: any) => string[]

get an array of all bottom level selected nodes (ignoring selected parents)

name

get_top_selected([full])

param

if set to true the returned array will consist of the full node objects, otherwise - only IDs will be returned

returns

public get_buffer: () => any

get the current buffer (any nodes that are waiting for a paste operation)

name

get_buffer()

returns

an object consisting of mode ("copy_node" or "move_node"), node (an array of objects) and inst (the instance)

public get_children_dom: (obj: any) => JQuery

get a jQuery collection of all the children of a node (node must be rendered)

name

get_children_dom(obj)

param
returns

public get_container: () => JQuery

returns the jQuery extended instance container

name

get_container()

returns

public get_icon: (obj: any) => string

get the node icon for a node

name

get_icon(obj)

param
returns

public get_json: (obj?: any, options?: JSTreeGetJsonOptions) => any

gets a JSON representation of a node (or the whole tree)

name

get_json([obj, options])

param
param
param

do not return state information

param

do not return ID

param

do not include children

param

do not include node data

param

return flat JSON instead of nested

returns

public get_next_dom: (obj: any, strict?: boolean) => JQuery

get the next visible node that is below the obj node. If strict is set to true only sibling nodes are returned.

name

get_next_dom(obj [, strict])

param
param
returns

public get_node: (obj: any, as_dom?: boolean) => JQuery

get the JSON representation of a node (or the actual jQuery extended DOM node) by using any input (child DOM element, ID string, selector, etc)

name

get_node(obj [, as_dom])

param
param
returns

public get_parent: (obj: any) => string

get the parent ID of a node

name

get_parent(obj)

param
returns

public get_path: (obj: any, glue: string, ids: boolean) => JQuery

get the path to a node, either consisting of node texts, or of node IDs, optionally glued together (otherwise an array)

name

get_path(obj [, glue, ids])

param

the node

param

if you want the path as a string - pass the glue here (for example '/'), if a falsy value is supplied here, an array is returned

param

if set to true build the path using ID, otherwise node text is used

returns

public get_prev_dom: (obj: any, strict?: boolean) => JQuery

get the previous visible node that is above the obj node. If strict is set to true only sibling nodes are returned.

name

get_prev_dom(obj [, strict])

param
param
returns

public get_rules: (obj: any) => any

used to retrieve the type settings object for a node

name

get_rules(obj)

param

the node to find the rules for

returns
plugin

types

public get_selected: (full?: any) => string[]

get an array of all selected nodes

name

get_selected([full])

param

if set to true the returned array will consist of the full node objects, otherwise - only IDs will be returned

returns

public get_text: (obj: any) => string

get the text value of a node

name

get_text(obj)

param

the node

returns

public get_theme: () => string

gets the name of the currently applied theme name

name

get_theme()

returns

public get_theme_variant: () => string

gets the name of the currently applied theme variant

name

get_theme()

returns

public get_top_selected: (full?: any) => string[]

get an array of all top level selected nodes (ignoring children of selected nodes)

name

get_top_selected([full])

param

if set to true the returned array will consist of the full node objects, otherwise - only IDs will be returned

returns

public get_type: (obj: any, rules?: any) => any

used to retrieve the type string or settings object for a node

name

get_type(obj [, rules])

param

the node to find the rules for

param

if set to true instead of a string the settings object will be returned

returns
plugin

types

public hide_checkboxes: () => void

hide the node checkbox icons

name

hide_checkboxes()

plugin

checkbox

public hide_dots: () => void

hides the connecting dots

name

hide_dots()

public hide_icon: (obj: any) => void

hide the icon on an individual node

name

hide_icon(obj)

param

public hide_icons: () => void

hide the node icons

name

hide_icons()

public hide_stripes: () => void

hides the striped background on the container

name

hide_stripes()

public is_closed: (obj: any) => boolean

check if a node is in a closed state

name

is_closed(obj)

param
returns

public is_disabled: (obj: any) => boolean

checks if a node is disabled (not selectable)

name

is_disabled(obj)

param
returns

public is_leaf: (obj: any) => boolean

check if a node has no children

name

is_leaf(obj)

param
returns

public is_loaded: (obj: any) => boolean

checks if a node is loaded (its children are available)

name

is_loaded(obj)

param
returns

public is_loading: (obj: any) => boolean

check if a node is currently loading (fetching children)

name

is_loading(obj)

param
returns

public is_open: (obj: any) => boolean

check if a node is opened

name

is_open(obj)

param
returns

public is_parent: (obj: any) => boolean

checks if a node has children

name

is_parent(obj)

param
returns

public is_selected: (obj: any) => boolean

checks if a node is selected

name

is_selected(obj)

param
returns

public jquery: string

public last_error: () => any

get the last error

name

last_error()

returns

public length: number

The number of elements in the jQuery object.

public load_node: (obj: any, callback: any) => boolean

loads a node (fetches its children using the core.data setting). Multiple nodes can be passed to by using an array.

name

load_node(obj [, callback])

param
param

a function to be executed once loading is conplete, the function is executed in the instance's scope and receives two arguments - the node and a boolean status

returns
trigger

load_node.jstree

public move_node: (obj: any, par: any, pos?: any, callback?: any, internal?: boolean) => void

move a node to a new parent

name

move_node(obj, par [, pos, callback, is_loaded])

param

the node to move, pass an array to move multiple nodes

param

the new parent

param

the position to insert at (besides integer values, "first" and "last" are supported, as well as "before" and "after"), defaults to integer 0

param

a function to call once the move is completed, receives 3 arguments - the node, the new parent and the position

param

parameter indicating if the parent node has been loaded

trigger

move_node.jstree

public open_all: (obj?: any, animation?: number, original_obj?: any) => void

opens all nodes within a node (or the tree), revaling their children. If the node is not loaded it will be loaded and opened once ready.

name

open_all([obj, animation, original_obj])

param

the node to open recursively, omit to open all nodes in the tree

param

the animation duration in milliseconds when opening the nodes, the default is no animation

param

to the node that started the process (internal use)

trigger

open_all.jstree

public open_node: (obj: any, callback?: any, animation?: any) => void

opens a node, revaling its children. If the node is not loaded it will be loaded and opened once ready.

name

open_node(obj [, callback, animation])

param

the node to open

param

a function to execute once the node is opened

param

the animation duration in milliseconds when opening the node (overrides the core.animation setting). Use false for no animation.

trigger

open_node.jstree, after_open.jstree, before_open.jstree

public paste: (obj: any) => void

copy or move the previously cut or copied nodes to a new parent

name

paste(obj [, pos])

param

the new parent

param

the position to insert at (besides integer, "first" and "last" are supported), defaults to integer 0

trigger

paste.jstree

public redraw: (full?: boolean) => void

redraws all nodes that need to be redrawn or optionally - the whole tree

name

redraw([full])

param

if set to true all nodes are redrawn.

public redraw_node: (obj: any, deep: boolean, is_callback: boolean) => any

public refresh: (skip_loading: boolean) => void

refreshes the tree - all nodes are reloaded with calls to load_node.

name

refresh()

param

an option to skip showing the loading indicator

trigger

refresh.jstree

public refresh_node: (obj: any) => void

refreshes a node in the tree (reload its children) all opened nodes inside that node are reloaded with calls to load_node.

name

refresh_node(obj)

param

an option to skip showing the loading indicator

trigger

refresh.jstree

public rename_node: (obj: any, val: string) => boolean

set the text value of a node

name

rename_node(obj, val)

param

the node, you can pass an array to rename multiple nodes to the same name

param

the new text value

returns
trigger

rename_node.jstree

public restore_state: () => void

restore the state from the user's computer

name

restore_state()

plugin

state

public save_state: () => void

save the state

name

save_state()

plugin

state

public search: (str: string, skip_async?: boolean) => void

used to search the tree nodes for a given string

name

search(str [, skip_async])

param

the search string

param

if set to true server will not be queried even if configured

plugin

search

trigger

search.jstree

public select_all: (supress_event?: boolean) => void

select all nodes in the tree

name

select_all([supress_event])

param

if set to true the changed.jstree event won't be triggered

trigger

select_all.jstree, changed.jstree

public select_node: (obj: any, supress_event?: boolean, prevent_open?: boolean, e?: any) => void

select a node

name

select_node(obj [, supress_event, prevent_open])

param

an array can be used to select multiple nodes

param

if set to true the changed.jstree event won't be triggered

param

if set to true parents of the selected node won't be opened

trigger

select_node.jstree, changed.jstree

public selector: string

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

public set_icon: (obj: any, icon: string) => void

set the node icon for a node

name

set_icon(obj, icon)

param
param

the new icon - can be a path to an icon or a className, if using an image that is in the current directory use a ./ prefix, otherwise it will be detected as a class

public set_id: (obj: any, id: string) => void

set (change) the ID of a node

name

set_id(obj, id)

param

the node

param

the new ID

returns

public set_theme: (theme_name: string, theme_url?: any) => void

changes the theme

name

set_theme(theme_name [, theme_url])

param

the name of the new theme to apply

param

the location of the CSS file for this theme. Omit or set to false if you manually included the file. Set to true to autoload from the core.themes.dir directory.

trigger

set_theme.jstree

public set_theme_variant: (variant_name: any) => void

changes the theme variant (if the theme has variants)

name

set_theme_variant(variant_name)

param

the variant to apply (if false is used the current variant is removed)

public set_type: (obj: any, type: string) => any

used to change a node's type

name

set_type(obj, type)

param

the node to change

param

the new type

plugin

types

public show_checkboxes: () => void

show the node checkbox icons

name

show_checkboxes()

plugin

checkbox

public show_contextmenu: (obj: any, x?: number, y?: number, e?: any) => void

prepare and show the context menu for a node

name

show_contextmenu(obj [, x, y])

param

the node

param

the x-coordinate relative to the document to show the menu at

param

the y-coordinate relative to the document to show the menu at

param

the event if available that triggered the contextmenu

plugin

contextmenu

trigger

show_contextmenu.jstree

public show_dots: () => void

shows the connecting dots (if the theme supports it)

name

show_dots()

public show_icon: (obj: any) => void

show the icon on an individual node

name

show_icon(obj)

param

public show_icons: () => void

show the node icons

name

show_icons()

public show_stripes: () => void

shows a striped background on the container (if the theme supports it)

name

show_stripes()

public teardown: () => void

context menu plugin

public toggle_checkboxes: () => void

toggle the node icons

name

toggle_checkboxes()

plugin

checkbox

public toggle_dots: () => void

toggles the connecting dots

name

toggle_dots()

public toggle_icons: () => void

toggle the node icons

name

toggle_icons()

public toggle_node: (obj: any) => void

toggles a node - closing it if it is open, opening it if it is closed

name

toggle_node(obj)

param

the node to toggle

public toggle_stripes: () => void

toggles the striped background on the container

name

toggle_stripes()

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 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 jstree(): JSTree

Returns

JSTree

public jstree(options: JSTreeStaticDefaults): JSTree

Parameters

Returns

JSTree

public jstree(arg: boolean): JSTree

Parameters

  • arg: boolean

Returns

JSTree

public jstree(args?: Array<any>): JSTree

Parameters

  • args?: Array<any> optional

Returns

JSTree

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