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.

]]>
For more information, see the jQuery 1.3 Release Notes.

]]>
For more information, see the jQuery 1.4 Release Notes

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

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

]]>
For more information, see the Release Notes/Changelog at http://blog.jquery.com/2013/05/24/jquery-1-10-0-and-2-0-1-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 );

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, cancelable, charCode, clientX, clientY, ctrlKey, currentTarget, data, detail, eventPhase, metaKey, offsetX, offsetY, originalTarget, pageX, pageY, prevValue, relatedTarget, screenX, screenY, shiftKey, target, view, which

OtherProperties

Certain events may have properties specific to them. Those can be accessed as properties of the event.originalEvent object.

Example:


// add the dataTransfer property for use with the native `drop` event
// to capture information about files dropped into the browser window
jQuery.event.props.push( "dataTransfer" );
]]>
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.

]]>
http://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().]]>
jQuery 1.0 Release Notes. ]]> 1.0.1, 1.0.2, 1.0.3, 1.0.4. ]]> jQuery 1.1 Release Notes. ]]> jQuery 1.1.2 Release Notes. ]]> jQuery 1.1.3 Release Notes ]]> jQuery 1.1.4 Release Notes. ]]> jQuery 1.2 Release Notes ]]> 1.2.1, 1.2.2, 1.2.3. ]]> jQuery 1.2.6 Release Notes. ]]> 1.3, 1.3.1, 1.3.2 ]]> jQuery 1.4 Release Notes. ]]> jQuery 1.4.1 Release Notes. ]]> jQuery 1.4.2 Release Notes. ]]> jQuery 1.4.3 Release Notes. ]]> 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 in the Deferred Object documentation.

]]>
Aspects of the API that were changed in the corresponding version of jQuery. API changes in jQuery 1.7.0 dealt primarily with the 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 at http://blog.jquery.com/2011/11/03/jquery-1-7-released/


]]>
Aspects of the API that were changed 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 at http://blog.jquery.com/2012/08/09/jquery-1-8-released/


]]>
Aspects of the API that were changed in the corresponding version of jQuery. Changes in jQuery 1.9 dealt primarily 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


]]>