I have many ajax calls in the application which are performing various operations, I am searching for a Jquery plugin or any other method which will detect any ajax call made and show loading image when operation is in process and hide it after operation is complete.Any help is welcome.
Asked
Active
Viewed 2,389 times
3 Answers
4
Got a solution for this , I used Pretty Loader and my problem is solved .

Wasim Pathan
- 420
- 5
- 17
-
just need to call a function jQuery.prettyLoader(); and it detects ajax call and show/hide the image before and after operation. – Wasim Pathan Oct 09 '13 at 13:15
2
$( document ).ajaxStart(function() {
ShowLoading(1);
});
$( document ).ajaxComplete(function() {
ShowLoading(0);
});

Omar Alshaker
- 879
- 9
- 22
0
$.ajax({
url: "test.html",
context: document.body
}).beforeSend(function() {
/* show loader */
}).success(function(){
/* hide loader */
});

Maciej Treder
- 11,866
- 5
- 51
- 74
-
i have more than 200 ajax call in my application, i doesn't seems logical to go an write hide(),show() function in each one of those. – Wasim Pathan Oct 09 '13 at 10:23