From 5b6ad9185340714146c7ce70c490f83affdfe710 Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Sun, 16 Aug 2015 23:33:26 +0100 Subject: [PATCH 1/3] Added note for Global Ajax Event Handlers Fixes gh-479 --- entries/ajaxComplete.xml | 1 + entries/ajaxError.xml | 1 + entries/ajaxSend.xml | 1 + entries/ajaxStart.xml | 1 + entries/ajaxStop.xml | 1 + entries/ajaxSuccess.xml | 1 + notes.xsl | 3 +++ 7 files changed, 9 insertions(+) diff --git a/entries/ajaxComplete.xml b/entries/ajaxComplete.xml index 7f045973..7481f97b 100644 --- a/entries/ajaxComplete.xml +++ b/entries/ajaxComplete.xml @@ -44,6 +44,7 @@ $( document ).ajaxComplete(function( event, xhr, settings ) {

Note: You can get the returned ajax contents by looking at xhr.responseText.

+ Show a message when an Ajax request completes. diff --git a/entries/ajaxError.xml b/entries/ajaxError.xml index d13f71e6..f674df42 100644 --- a/entries/ajaxError.xml +++ b/entries/ajaxError.xml @@ -42,6 +42,7 @@ $( document ).ajaxError(function( event, jqxhr, settings, thrownError ) { } }); + Show a message when an Ajax request fails. diff --git a/entries/ajaxSend.xml b/entries/ajaxSend.xml index 2d609b71..0678622c 100644 --- a/entries/ajaxSend.xml +++ b/entries/ajaxSend.xml @@ -42,6 +42,7 @@ $( document ).ajaxSend(function( event, jqxhr, settings ) { }); + Show a message before an Ajax request is sent. diff --git a/entries/ajaxStart.xml b/entries/ajaxStart.xml index 7747e5b6..92e6cc70 100644 --- a/entries/ajaxStart.xml +++ b/entries/ajaxStart.xml @@ -31,6 +31,7 @@ $( ".trigger" ).click(function() {

When the user clicks the element with class trigger and the Ajax request is sent, the log message is displayed.

As of jQuery 1.8, the .ajaxStart() method should only be attached to document.

+ Show a loading message whenever an Ajax request starts (and none is already active). diff --git a/entries/ajaxStop.xml b/entries/ajaxStop.xml index 76b3bffc..fc0781f6 100644 --- a/entries/ajaxStop.xml +++ b/entries/ajaxStop.xml @@ -31,6 +31,7 @@ $( ".trigger" ).click(function() {

When the user clicks the element with class trigger and the Ajax request completes, the log message is displayed.

As of jQuery 1.8, the .ajaxStop() method should only be attached to document.

+ Hide a loading message after all the Ajax requests have stopped. diff --git a/entries/ajaxSuccess.xml b/entries/ajaxSuccess.xml index 26583e2e..8972b24d 100644 --- a/entries/ajaxSuccess.xml +++ b/entries/ajaxSuccess.xml @@ -45,6 +45,7 @@ $( document ).ajaxSuccess(function( event, xhr, settings ) {

Note: You can get the returned ajax contents by looking at xhr.responseXML or xhr.responseText for xml and html respectively.

+ Show a message when an Ajax request completes successfully. diff --git a/notes.xsl b/notes.xsl index 33a2c073..43f333af 100644 --- a/notes.xsl +++ b/notes.xsl @@ -67,6 +67,9 @@ As the .() method is just a shorthand for .on( "", handler ), detaching is possible using .off( "" ). + + Starting with jQuery 1.9, all the handlers for the jQuery global Ajax events, including those added with the method, must be attached to document. + From 205635575c0db661a73e4bbb1c26bbd6b0e2ba4e Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Mon, 17 Aug 2015 16:18:42 +0100 Subject: [PATCH 2/3] Update notes.xsl --- notes.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes.xsl b/notes.xsl index 43f333af..5dba7ee9 100644 --- a/notes.xsl +++ b/notes.xsl @@ -68,7 +68,7 @@ As the .() method is just a shorthand for .on( "", handler ), detaching is possible using .off( "" ). - Starting with jQuery 1.9, all the handlers for the jQuery global Ajax events, including those added with the method, must be attached to document. + As of jQuery 1.9, all the handlers for the jQuery global Ajax events, including those added with the method, must be attached to document. From 7bcbe477bc520cd392e47d51cd1aa382f8e97250 Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Mon, 17 Aug 2015 19:18:00 +0100 Subject: [PATCH 3/3] Update notes.xsl --- notes.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes.xsl b/notes.xsl index 5dba7ee9..eb5a9c61 100644 --- a/notes.xsl +++ b/notes.xsl @@ -68,7 +68,7 @@ As the .() method is just a shorthand for .on( "", handler ), detaching is possible using .off( "" ). - As of jQuery 1.9, all the handlers for the jQuery global Ajax events, including those added with the method, must be attached to document. + As of jQuery 1.9, all the handlers for the jQuery global Ajax events, including those added with the method, must be attached to document.