Skip to content

Commit bad3511

Browse files
committed
Ajax_Events: Update examples so they are consistent
Examples should be consistent in where they log to and attached to document instead of elsewhere
1 parent 75a3613 commit bad3511

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

entries/ajaxError.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<p>Attach the event handler to the document:</p>
2020
<pre><code>
2121
$( document ).ajaxError(function() {
22-
$( "div.log" ).text( "Triggered ajaxError handler." );
22+
$( ".log" ).text( "Triggered ajaxError handler." );
2323
});
2424
</code></pre>
2525
<p>Now, make an Ajax request using any jQuery method:</p>

entries/ajaxStop.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
</code></pre>
1919
<p>Attach the event handler to the document:</p>
2020
<pre><code>
21-
$( ".log" ).ajaxStop(function() {
22-
$( this ).text( "Triggered ajaxStop handler." );
21+
$( document ).ajaxStop(function() {
22+
$( ".log" ).text( "Triggered ajaxStop handler." );
2323
});
2424
</code></pre>
2525
<p>Now, make an Ajax request using any jQuery method:</p>

0 commit comments

Comments
 (0)