global property in jQuery.ajaxSetup() is true, which it is by default. Note: Global events are never fired for cross-domain script or JSONP requests, regardless of the value of global.]]> jQuery.Callbacks() function, introduced in version 1.7, returns a multi-purpose object that provides a powerful way to manage callback lists. It supports adding, removing, firing, and disabling callbacks.]]> The Deferred object, introduced in jQuery 1.5, is a chainable utility object created by calling the jQuery.Deferred() method. It can register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function.

The Deferred object is chainable, similar to the way a jQuery object is chainable, but it has its own methods. After creating a Deferred object, you can use any of the methods below by either chaining directly from the object creation or saving the object in a variable and invoking one or more methods on that variable.

]]>
This version is no longer supported. Read more about our Version Support.

All the aspects of the API that were deprecated in the corresponding version of jQuery.

For more information, see the jQuery 1.3 Release Notes.

]]>
This version is no longer supported. Read more about our Version Support.

All the aspects of the API that were deprecated in the corresponding version of jQuery.

For more information, see the jQuery 1.4 Release Notes

]]>
This version is no longer supported. Read more about our Version Support.

All the aspects of the API that were deprecated in the corresponding version of jQuery.

For more information, see the Release Notes/Changelog at https://blog.jquery.com/2011/11/03/jquery-1-7-released/

]]>
This version is no longer supported. Read more about our Version Support.

All the aspects of the API that were deprecated in the corresponding version of jQuery.

For more information, see the Release Notes/Changelog at https://blog.jquery.com/2012/08/09/jquery-1-8-released/

]]>
This version is no longer supported. Read more about our Version Support.

All the aspects of the API that were deprecated in the corresponding version of jQuery.

For more information, see the Release Notes/Changelog at https://blog.jquery.com/2013/01/15/jquery-1-9-final-jquery-2-0-beta-migrate-final-released/

]]>
These versions are no longer supported. Read more about our Version Support.

All the aspects of the API that were deprecated in the corresponding version of jQuery.

For more information, see the Release Notes/Changelog at https://blog.jquery.com/2013/05/24/jquery-1-10-0-and-2-0-1-released/

]]>
All the aspects of the API that were deprecated in the corresponding version of jQuery.

For more information, see the Release Notes/Changelog at https://blog.jquery.com/2016/06/09/jquery-3-0-final-released/

]]>
All the aspects of the API that were deprecated in the corresponding version of jQuery.

For more information, see the Release Notes/Changelog at https://blog.jquery.com/2017/03/16/jquery-3-2-0-is-out/

]]>
All the aspects of the API that were deprecated in the corresponding version of jQuery.

For more information, see the Release Notes/Changelog at https://blog.jquery.com/2018/01/19/jquery-3-3-0-a-fragrant-bouquet-of-deprecations-and-is-that-a-new-feature/

]]>
All the aspects of the API that were deprecated in the corresponding version of jQuery.

For more information, see the Release Notes/Changelog at https://blog.jquery.com/2019/04/10/jquery-3-4-0-released/

]]>
All the aspects of the API that were deprecated in the corresponding version of jQuery.

For more information, see the Release Notes/Changelog at https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/

]]>
jQuery's event system normalizes the event object according to W3C standards. The event object is guaranteed to be passed to the event handler. Most properties from the original event are copied over and normalized to the new event object.

jQuery.Event Constructor

The jQuery.Event constructor is exposed and can be used when calling trigger. The new operator is optional.

Check trigger's documentation to see how to combine it with your own event object.

Example:


//Create a new jQuery.Event object without the "new" operator.
var e = jQuery.Event( "click" );

// trigger an artificial click event
jQuery( "body" ).trigger( e );

As of jQuery 1.6, you can also pass an object to jQuery.Event() and its properties will be set on the newly created Event object.

Example:


// Create a new jQuery.Event object with specified event properties.
var e = jQuery.Event( "keydown", { keyCode: 64 } );

// trigger an artificial keydown event with keyCode 64
jQuery( "body" ).trigger( e );

Common Event Properties

jQuery normalizes the following properties for cross-browser consistency:

  • target
  • relatedTarget
  • pageX
  • pageY
  • which
  • metaKey

The following properties are also copied to the event object, though some of their values may be undefined depending on the event:

altKey, bubbles, button, buttons, cancelable, char, charCode, clientX, clientY, ctrlKey, currentTarget, data, detail, eventPhase, key, keyCode, metaKey, offsetX, offsetY, originalTarget, pageX, pageY, relatedTarget, screenX, screenY, shiftKey, target, toElement, view, which

Other Properties

To access event properties not listed above, use the event.originalEvent object:


// Access the `dataTransfer` property from the `drop` event which
// holds the files dropped into the browser window.
var files = event.originalEvent.dataTransfer.files;
]]>
Attributes category), while others set an element's style properties (also listed in the CSS category). Still others modify entire elements (or groups of elements) themselves—inserting, copying, removing, and so on. All of these methods are referred to as "setters," as they change the values of properties. A few of these methods—such as .attr(), .html(), and .val()—also act as "getters," retrieving information from DOM elements for later use. ]]> Borrowing from CSS 1–3, and then adding its own, jQuery offers a powerful set of tools for matching a set of elements in a document.

To use any of the meta-characters ( such as !"#$%&'()*+,./:;<=>?@[\]^`{|}~ ) as a literal part of a name, it must be escaped with with two backslashes: \\. For example, an element with id="foo.bar", can use the selector $("#foo\\.bar"). The W3C CSS specification contains the complete set of rules regarding valid CSS selectors. Also useful is the blog entry by Mathias Bynens on CSS character escape sequences for identifiers.

]]>
The CSS specification allows elements to be identified by their attributes. While not supported by some older browsers for the purpose of styling documents, jQuery allows you to employ them regardless of the browser being used.

When using any of the following attribute selectors, you should account for attributes that have multiple, space-separated values. Since these selectors see attribute values as a single string, this selector, for example, $("a[rel='nofollow']"), will select <a href="example.html" rel="nofollow">Some text</a> but not <a href="example.html" rel="nofollow foe">Some text</a>.

Attribute values in selector expressions must follow the rules for W3C CSS selectors; in general, that means anything other than a valid identifier should be surrounded by quotation marks.

  • double quotes inside single quotes: $('a[rel="nofollow self"]')
  • single quotes inside double quotes: $("a[rel='nofollow self']")
  • escaped single quotes inside single quotes: $('a[rel=\'nofollow self\']')
  • escaped double quotes inside double quotes: $("a[rel=\"nofollow self\"]")

The variation you choose is generally a matter of style or convenience.

Note: In jQuery 1.3 [@attr] style selectors were removed (they were previously deprecated in jQuery 1.2). Simply remove the "@" symbol from your selectors in order to make them work again.

]]>
https://www.w3.org/Style/CSS/#specs. ]]> querySelectorAll() method. To achieve the best performance when using these selectors, first select some elements using a pure CSS selector, then use .filter().]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

jQuery 1.0 Release Notes.
]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

Release Notes: 1.0.1, 1.0.2, 1.0.3, 1.0.4.
]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

jQuery 1.1 Release Notes.
]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

jQuery 1.1.2 Release Notes.
]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

jQuery 1.1.3 Release Notes
]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

jQuery 1.1.4 Release Notes.
]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

jQuery 1.2 Release Notes
]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

Release Notes: 1.2.1, 1.2.2, 1.2.3.
]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

jQuery 1.2.6 Release Notes.
]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

Release Notes: 1.3, 1.3.1, 1.3.2
]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

jQuery 1.4 Release Notes.
]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

jQuery 1.4.1 Release Notes.
]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

jQuery 1.4.2 Release Notes.
]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

jQuery 1.4.3 Release Notes.
]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

jQuery 1.4.4 Release Notes.
]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

jQuery 1.5 also includes a large rewrite of the Ajax module, which has a number of extensibility improvements. You can find out more about those improvements in the Extending Ajax documentation.

Additionally, jQuery 1.5 includes a new Deferred callback management system you can learn more about in the Deferred Object documentation.


]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

API changes in jQuery 1.5.1 dealt primarily with jQuery.ajax settings and jQuery.support properties.


]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.


]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

jQuery 1.7.0 included:

  • New event APIs: .on() and .off()
  • Better Support for HTML5 in IE6/7/8
  • jQuery.Callbacks()
  • Toggling Animations Work Intuitively

For more information, see the Release Notes/Changelog


]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

API changes in jQuery 1.8.0 dealt primarily with animations and the removal of some methods such as deferred.isResolved(), deferred.isRejected(), $.curCSS(), $.attrFn(), and $(element).closest(Array) returning Array.

For more information, see the Release Notes/Changelog


]]>
Some APIs may have changed since this version was released. If using this version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

Changes in jQuery 1.9 dealt primarily with removal or modification of several APIs that behaved inconsistently or inefficiently in the past.

A jQuery Migrate Plugin was offered to help developers with a transitional upgrade path.

For more information, see the jQuery Core 1.9 Upgrade guide and the Release Notes/Changelog


]]>
Some APIs may have changed since these versions were released. If using either version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

Changes in jQuery 1.10 and 2.0 include a new `wrap` module, relaxing HTML parsing, and aligning the 1.x & 2.x lines.

For more information, see the 2.0 Release Notes/Changelog and 1.10.0/2.0.1 Release Notes/Changelog.


]]>
Some APIs may have changed since these versions were released. If using either version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

Changes in jQuery 1.11 and 2.1 include lower startup overhead & fewer forced layouts; jQuery is now authored via AMD and published to npm & bower under the name jquery.

For more information, see the Release Notes/Changelog.


]]>
Some APIs may have changed since these versions were released. If using either version, find out about our version support.

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

Changes in jQuery 1.12 and 2.2 include performance improvements of the selector engine, manipulation of class names for SVG elements, support for the Symbol type and iterators added in ES2015, and a new hook has been added for filtering HTML.

For more information, see the Release Notes/Changelog.


]]>
All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

Changes in jQuery 3.0 dealt primarily with deferreds, data, show/hide and removal of some deprecated APIs. A jQuery Migrate Plugin was offered to help developers with a transitional upgrade path.

For more information, see the jQuery Core 3.0 Upgrade guide and the Release Notes/Changelog.


]]>
All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

Version 3.1 added the jQuery.readyException API.

For more information, see the Release Notes/Changelog.


]]>
All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

Version 3.2 added support for custom CSS properties, made .contents() work on the <template> element & made .width() & .height() ignore CSS transforms. A few APIs were deprecated. The deprecated module was added back to the slim build.

For more information, see the Release Notes/Changelog.


]]>
All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

.addClass(), .removeClass() & .toggleClass() now work on arrays of classes; a few APIs were deprecated.

For more information, see the Release Notes/Changelog.


]]>
All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

nonce & nomodule attributes are now preserved during script manipulation, layout thrashing was eliminated in some cases in .width() & .height() APIs. Radio elements state is now updated before event handlers run. Passing data now works when triggering all events, including focus. A minor security fix is also included.

For more information, see the Release Notes/Changelog.


]]>
All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

Security fixes, including a breaking change to jQuery.htmlPrefilter; new .even() & .odd() methods; jQuery.globalEval now accepts context; unsuccessful HTTP script responses are no longer evaluated; performance improvements. jQuery.trim is now deprecated. A jQuery Migrate Plugin was offered to help developers with a transitional upgrade path.

For more information, see the jQuery Core 3.5 Upgrade guide and the Release Notes/Changelog.


]]>
All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

Returning JSON even for JSONP erroneous responses is working again, a few focus fixes.

For more information, see the Release Notes/Changelog.


]]>
All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

New .uniqueSort() method performance improvements in manipulation, fixes for .outerWidth( true ) & .outerHeight( true ) with negative margins, focus fixes.

As of this release, jQuery no longer relies on Sizzle.

Native events for focus & blur changed in IE to - respectively - focusin and focusout.

For more information, see the Release Notes/Changelog.


]]>
This is a pre-release. Behavior may change before 4.0.0 final is released.

Aspects of the API that were changed in the corresponding version of jQuery.

Dropped support for IE <11 & Edge Legacy, removed deprecated APIs, added FormData support, improved support for CSP & Trusted Types. Automatic JSONP promotion removed. Special handling of boolean attributes removed.

Callbacks & Deferred modules are now excluded from the Slim build.

jQuery is now authored in ESM.

For more information, see the Release Notes/Changelog of jQuery 4.0.0-beta.2.


]]>