jQuery is a popular JavaScript for creating dynamic web pages.

In this article, we’ll look at how to using jQuery in our web apps.

.ajaxStop()

The .ajaxStop() method lets us add a callback that’s called when the Ajax request is done.

For example, we can write:

$(document).ajaxStop(function(event, xhr, settings) {
  console.log(event, xhr, settings)
});

$.ajax({
  url: "https://yesno.wtf/api",
  context: document.body
}).done(function() {
  $(this).addClass("done");
});

We passed in a callback with the event , xhr , and settings parameter.

settings has the request data like the URL and request method.

xhr is an object with the request state.

#technology #javascript

jQuery — Ajax, Animation, and Append
1.45 GEEK