From 205a35f834252ac905adb167704aaa26b26827c7 Mon Sep 17 00:00:00 2001 From: Eric Lee Carraway Date: Tue, 3 Nov 2015 19:44:42 -0600 Subject: [PATCH] Docs(entries): Fix typos --- entries/contents.xml | 2 +- entries/jQuery.ajax.xml | 4 ++-- entries/jQuery.ajaxTransport.xml | 2 +- entries/on.xml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/entries/contents.xml b/entries/contents.xml index 6f348b9b..5bfe9fc6 100644 --- a/entries/contents.xml +++ b/entries/contents.xml @@ -50,7 +50,7 @@ $( "p" ) ]]> - Change the background colour of links inside of an iframe. + Change the background color of links inside of an iframe. diff --git a/entries/jQuery.ajax.xml b/entries/jQuery.ajax.xml index 4c8f6686..81e3e42c 100644 --- a/entries/jQuery.ajax.xml +++ b/entries/jQuery.ajax.xml @@ -318,7 +318,7 @@ jqxhr.always(function() {

As of jQuery 1.5, jQuery's Ajax implementation includes prefilters, transports, and converters that allow you to extend Ajax with a great deal of flexibility.

Using Converters

-

$.ajax() converters support mapping data types to other data types. If, however, you want to map a custom data type to a known type (e.g json), you must add a correspondance between the response Content-Type and the actual data type using the contents option:

+

$.ajax() converters support mapping data types to other data types. If, however, you want to map a custom data type to a known type (e.g json), you must add a correspondence between the response Content-Type and the actual data type using the contents option:


 $.ajaxSetup({
   contents: {
@@ -332,7 +332,7 @@ $.ajaxSetup({
   }
 });
     
-

This extra object is necessary because the response Content-Types and data types never have a strict one-to-one correspondance (hence the regular expression).

+

This extra object is necessary because the response Content-Types and data types never have a strict one-to-one correspondence (hence the regular expression).

To convert from a supported type (e.g text, json) to a custom data type and back again, use another pass-through converter:


 $.ajaxSetup({
diff --git a/entries/jQuery.ajaxTransport.xml b/entries/jQuery.ajaxTransport.xml
index 93bcbf77..ccc73ce8 100644
--- a/entries/jQuery.ajaxTransport.xml
+++ b/entries/jQuery.ajaxTransport.xml
@@ -48,7 +48,7 @@ function( status, statusText, responses, headers ) {}
     
  • status is the HTTP status code of the response, like 200 for a typical success, or 404 for when the resource is not found.
  • statusText is the statusText of the response.
  • -
  • responses (Optional) is An object containing dataType/value that contains the response in all the formats the transport could provide (for instance, a native XMLHttpRequest object would set reponses to { xml: XMLData, text: textData } for a response that is an XML document)
  • +
  • responses (Optional) is An object containing dataType/value that contains the response in all the formats the transport could provide (for instance, a native XMLHttpRequest object would set responses to { xml: XMLData, text: textData } for a response that is an XML document)
  • headers (Optional) is a string containing all the response headers if the transport has access to them (akin to what XMLHttpRequest.getAllResponseHeaders() would provide).

Just like prefilters, a transport's factory function can be attached to a specific dataType:

diff --git a/entries/on.xml b/entries/on.xml index 9a7e66ed..34d14f4e 100644 --- a/entries/on.xml +++ b/entries/on.xml @@ -34,7 +34,7 @@

The .on() method attaches event handlers to the currently selected set of elements in the jQuery object. As of jQuery 1.7, the .on() method provides all functionality required for attaching event handlers. For help in converting from older jQuery event methods, see .bind(), .delegate(), and .live(). To remove events bound with .on(), see .off(). To attach an event that runs only once and then removes itself, see .one()

Event names and namespaces

-

Any event names can be used for the events argument. jQuery will pass through the browser's standard JavaScript event types, calling the handler function when the browser generates events due to user actions such as click. In addition, the .trigger() method can trigger both standard browser event names and custom event names to call attached handlers. Event names should only contain alphanumerics, underscore, and colon chraracters.

+

Any event names can be used for the events argument. jQuery will pass through the browser's standard JavaScript event types, calling the handler function when the browser generates events due to user actions such as click. In addition, the .trigger() method can trigger both standard browser event names and custom event names to call attached handlers. Event names should only contain alphanumerics, underscore, and colon characters.

An event name can be qualified by event namespaces that simplify removing or triggering the event. For example, "click.myPlugin.simple" defines both the myPlugin and simple namespaces for this particular click event. A click event handler attached via that string could be removed with .off("click.myPlugin") or .off("click.simple") without disturbing other click handlers attached to the elements. Namespaces are similar to CSS classes in that they are not hierarchical; only one name needs to match. Namespaces beginning with an underscore are reserved for jQuery's use.

In the second form of .on(), the events argument is a plain object. The keys are strings in the same form as the events argument with space-separated event type names and optional namespaces. The value for each key is a function (or false value) that is used as the handler instead of the final argument to the method. In other respects, the two forms are identical in their behavior as described below.

Direct and delegated events