JQuery – Display loading image on ajax call example

JQuery – Display loading image on ajax call example

In this post we will give you information about JQuery – Display loading image on ajax call example. Hear we will give you detail about JQuery – Display loading image on ajax call exampleAnd how to use it also give you demo for it if it is necessary.

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.

Example:

<script type="text/javascript">

$(document).ready(function()

{

$(document).ajaxStart(function(){

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

});

$(document).ajaxComplete(function(){

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

});

});

</script>

Hope this code and post will helped you for implement JQuery – Display loading image on ajax call example. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

For More Info See :: laravel And github

Leave a Comment

Your email address will not be published. Required fields are marked *

7  +  1  =  

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US