How to use ajaxStart() Method in JQuery AJAX

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

JQuery AJAX ajaxStart() Method

  • ajaxStart() method add a function to be execute when an AJAX request begins and already active.

  • ajaxStart() method is a AJAX Event.



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



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




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

<script type="text/javascript">

    $(document).ready(function () {

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

            $(this).html("<img src='demo_wait.gif' />");


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







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






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

© 2020 DotNetHeaven. All rights reserved.