Skip to content
jQuery

jquery API Reference

jQuery core APIs — selector and engine, AJAX helpers, and DOM manipulation methods.

By EZ4Code Team

Core

The jQuery function and utilities for selecting elements and chaining operations.

$(selector, context?) -> jQuery

Selects DOM elements matching a CSS selector and wraps them in a jQuery object.

Returns: jQuery

$(element) / $(htmlString) -> jQuery

Wraps an existing DOM element or creates new elements from an HTML string.

Returns: jQuery

$.each(arrayOrObject, callback)

Generic iterator over arrays or objects. Return false from the callback to stop.

Returns: Array | object

$.extend(deep?, target, ...objects)

Merges the contents of two or more objects into the first object.

Returns: object

$(callback)

Runs a function after the DOM is fully parsed and ready (shorthand for $(document).ready).

Returns: jQuery

AJAX

jQuery AJAX helpers for making HTTP requests and handling responses.

$.ajax(url, settings?) -> jqXHR

Performs an asynchronous HTTP request. Returns a Promise-like jqXHR object.

Returns: jqXHR (Promise)

$.get(url, data?, success?, dataType?) -> jqXHR

Shorthand for an HTTP GET request.

Returns: jqXHR (Promise)

$.post(url, data?, success?, dataType?) -> jqXHR

Shorthand for an HTTP POST request.

Returns: jqXHR (Promise)

$.getJSON(url, data?, success?) -> jqXHR

Loads JSON-encoded data from the server using a GET HTTP request.

Returns: jqXHR (Promise)

DOM

jQuery DOM manipulation, traversal, and event methods.

.html(htmlString?) -> string | jQuery

Gets the HTML contents of the first element, or sets the HTML of every matched element.

Returns: string | jQuery

.text(text?) -> string | jQuery

Gets or sets the combined text contents of matched elements.

Returns: string | jQuery

.on(events, handler) -> jQuery

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

Returns: jQuery

.find(selector) -> jQuery

Gets the descendants of each element filtered by a selector.

Returns: jQuery

.css(propertyName, value?) -> string | jQuery

Gets or sets CSS properties for matched elements.

Returns: string | jQuery

More jQuery API References