diff --git a/categories.xml b/categories.xml new file mode 100644 index 00000000..79e9fca0 --- /dev/null +++ b/categories.xml @@ -0,0 +1,366 @@ + + + The jQuery library has a full suite of AJAX capabilities. The functions and methods therein allow us to load data from the server without a browser page refresh. + + These methods register handlers to be called when certain events, such as initialization or completion, take place for any AJAX request on the page. The global events are fired on each AJAX request if the 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. + + + These functions assist with common idioms encountered when performing AJAX tasks. + + + These methods can be used to make arbitrary AJAX requests. + + + These methods perform the more common types of AJAX requests in less code. + + + + These methods get and set DOM attributes of elements. + + + The 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. + + + + + + These methods get and set CSS-related properties of elements. + + + These methods allow us to associate arbitrary data with specific DOM elements. + + + +

jQuery.Deferred(), introduced in version 1.5, is a chainable utility object that can register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function.

+
+

In JavaScript it is common to invoke functions that optionally accept callbacks that are called within that function.

+

For example, in versions prior to jQuery 1.5, asynchronous processes such as jQuery.ajax() accept callbacks to be invoked some time in the near-future upon success, error, and completion of the ajax request.

+

jQuery.Deferred() introduces several enhancements to the way callbacks are managed and invoked. In particular, jQuery.Deferred() provides flexible ways to provide multiple callbacks, and these callbacks can be invoked regardless of whether the original callback dispatch has already occurred. jQuery Deferred is based on the CommonJS Promises/A design.

+

One model for understanding Deferred is to think of it as a chain-aware function wrapper. The deferred.then(), deferred.done(), and deferred.fail() methods specify the functions to be called and the deferred.resolve(args) or deferred.reject(args) methods "call" the functions with the arguments you supply. Once the Deferred has been resolved or rejected it stays in that state; a second call to deferred.resolve() is ignored for example. If more functions are added by deferred.then() after the Deferred is resolved, they are called immediately with the arguments previously provided.

+

In most cases where a jQuery API call returns a Deferred or Deferred-compatible object, such as jQuery.ajax() or jQuery.when(), you will only want to use the deferred.then(), deferred.done(), and deferred.fail() methods to add callbacks to the Deferred's queues. The internals of the API call or code that created the Deferred will invoke deferred.resolve() or deferred.reject() on the deferred at some point, causing the appropriate callbacks to run.

+

jQuery.Deferred Constructor

+

The jQuery.Deferred() constructor creates a new Deferred object. The new operator is optional.

+

jQuery.Deferred can be passed an optional function, which is called just before the constructor returns and is passed the constructed deferred object as both the this object and as the first argument to the function. The called function can attach callbacks using deferred.then() for example.

+

A Deferred object starts in the pending state. Any callbacks added to the object with deferred.then(), deferred.done(), or deferred.fail() are queued to be executed later. Calling deferred.resolve() or deferred.resolveWith() transitions the Deferred into the resolved state and immediately executes any doneCallbacks that are set. Calling deferred.reject() or deferred.rejectWith() transitions the Deferred into the rejected state and immediately executes any failCallbacks that are set. Once the object has entered the resolved or rejected state, it stays in that state. Callbacks can still be added to the resolved or rejected Deferred -- they will execute immediately.

+

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.

+
+
+
+ + These items have been deprecated, though not necessarily removed, from jQuery. + + + + + + The jQuery library provides several techniques for adding animation to a web page. These include simple, standard animations that are frequently used, and the ability to craft sophisticated custom effects. In this chapter, we'll closely examine each of the effect methods, revealing all of the mechanisms jQuery has for providing visual feedback to the user. + + + + + These methods allow you to create effects that are not provided "out of the box" by jQuery. + + + These methods adjust the opacity of elements. + + + + + + + These methods are used to register behaviors to take effect when the user interacts with the browser, and to further manipulate those registered behaviors. + + + + + + + + + + + +

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:

+
+

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:

+
+

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. To make special properties available in all event objects, they can be added to the jQuery.event.props array. This is not recommended, since it adds overhead to every event delivered by jQuery.

+

Example:

+
+
+
+
+ + + + + + + + + +
+ + + + + Although this category is referred to as 'internal', any methods documented within the API site should be considered public and may be freely used. + + + All of the methods in this chapter manipulate the DOM in some manner. A few of them simply change one of the attributes of an element (also listed in the 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. + + + These methods inspect and manipulate the CSS classes assigned to elements. + + + This method allows us to make copies of elements. + + + + + + These methods allow us to insert new content surrounding existing content. + + + These methods allow us to insert new content inside an existing element. + + + These methods allow us to insert new content outside an existing element. + + + These methods allow us to delete elements from the DOM. + + + These methods are used to remove content from the DOM and replace it with new content. + + + These methods get and set DOM attributes of elements + + + These methods get and set CSS-related properties of elements. + + + + + + + + + These methods allow us to associate arbitrary data with specific DOM elements. + + + + + + + + + + + + + + + Each jQuery object created with the jQuery() function contains a number of properties alongside its methods. These properties allow us to inspect various attributes of the object. + + + These properties are associated with the global jQuery object. + + + + +

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.

+

If you wish to use any of the meta-characters ( such as !"#$%&'()*+,./:;<=>?@[\]^`{|}~ ) as a literal part of a name, you must escape the character with two backslashes: \\. For example, if you have an element with id="foo.bar", you 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 also allows elements to be identified by their attributes. While not widely supported by browsers for the purpose of styling documents, these attribute selectors are highly useful, and jQuery allows us to employ them regardless of the browser being used. + When using any of the following attribute selectors, we 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 Some text but not Some text.

+

Attribute values in selector expressions must follow the rules for W3C CSS selectors, in general that means anything other than a simple 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.

+
+
+ + The following selectors are based on the Cascading Style Sheet 1 specification, as outlined by the W3C. For more information about the specifications, visit http://www.w3.org/Style/CSS/#specs. + + + + + + + + + + + + + + + + + + jQuery has extended the CSS3 selectors with the following selectors. Because these selectors are jQuery extension and not part of the CSS specification, queries using them cannot take advantage of the performance boost provided by the native DOM querySelectorAll() method. To achieve the best performance when using these selectors, first select some elements using a pure CSS selector, then use .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 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.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 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.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.2 + + + + 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. + + + + 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 in the Deferred Object documentation.

+
+
+ + Aspects of the API that were changed 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. + + + +

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/

+
+
+
+
+