How to use ajaxStop() Method in JQuery AJAX

In this article, I will explain use of ajaxStop() Method in JQuery AJAX.
  • 4145

JQuery AJAX ajaxStop() Method

  • ajaxStop() method add a function to be executed when all AJAX requests have stop.

  • ajaxStop() method will run if no other requests are pending.

  • ajaxStop() method is a AJAX Event.



  • function()  The function is run when the request is stop.



The following example show the use of ajaxStop() method.


<!DOCTYPE html>



<script type="text/javascript" src="jquery.js"></script>

<script type="text/javascript">

    $(document).ready(function () {

        $("div").ajaxStop(function () {

            alert("All AJAX requests completed");


        $("button").click(function () {








<div><h2>ajaxStop() Method Example</h2></div>

<button>click for change article text</button>





You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2018 DotNetHeaven. All rights reserved.