JQuery - Display loading image on ajax call example

By Hardik Savani September 6, 2020 Category : Javascript jQuery Ajax

Sometimes, we want to display loading image or animation or text when fire every ajax request. In not for only one ajax request, but if you want to load image on every ajax request then you can do that using bellow example.

I use ajaxStart() and ajaxComplete() function for show image until All POST or GET Ajax request. this both function will execute one each $.ajax request.


<script type="text/javascript">




$('#process_img').css("display", "block");



$('#process_img').css("display", "none");




We are Recommending you