What is the ajaxStop() method in jQuery?

Overview

In jQuery, the ajaxStop() method is used to specify a function that runs when an AJAX request completes.

Syntax

$(document).ajaxStop(function());

Parameters

This method accepts only one parameter, which is the function that gets invoked when a request completes.

Example

Console
Example of ajaxStop() method

We click the Get Product Data button and make an AJAX request on https://reqres.in/api/products to get product details.

When the AJAX request completes, the ajaxStop() method will be invoked.

New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources