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.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.
]]>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.
]]>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
]]>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/
]]>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/
]]>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/
]]>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/
]]>For more information, see the Release Notes/Changelog at https://blog.jquery.com/2016/06/09/jquery-3-0-final-released/
]]>For more information, see the Release Notes/Changelog at https://blog.jquery.com/2017/03/16/jquery-3-2-0-is-out/
]]>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/
]]>For more information, see the Release Notes/Changelog at https://blog.jquery.com/2019/04/10/jquery-3-4-0-released/
]]>For more information, see the Release Notes/Changelog at https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/
]]>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 );
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
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;
.attr(), .html(), and .val()—also act as "getters," retrieving information from DOM elements for later use.
]]>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.
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.
$('a[rel="nofollow self"]')$("a[rel='nofollow self']")$('a[rel=\'nofollow self\']')$("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.
.filter().]]>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.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.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.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.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 NotesAll 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.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 NotesAll 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.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.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.2All 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.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.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.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.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.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.
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.
All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.
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:
.on() and .off()jQuery.Callbacks()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.
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
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
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.
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.
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.
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.
Version 3.1 added the jQuery.readyException API.
For more information, see the Release Notes/Changelog.
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.
.addClass(), .removeClass() & .toggleClass() now work on arrays of classes; a few APIs were deprecated.
For more information, see the Release Notes/Changelog.
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.
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.
Returning JSON even for JSONP erroneous responses is working again, a few focus fixes.
For more information, see the Release Notes/Changelog.
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.
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.