How to show ajax loading gif only for a specific request?

Posted by innerJL on Stack Overflow See other posts from Stack Overflow or by innerJL
Published on 2010-04-22T18:45:10Z Indexed on 2010/04/22 22:33 UTC
Read the original article Hit count: 199

Filed under:
|
|
|

How do you show ajax gif only for a specific request? For example my page is calling a web-service every 30 seconds in a background, and I don't want to show the gif during this callback. On the other hand I want to show the gif, when I'am making manual ajax requests.

I am using jQuery.

edit: I didn't setup the global handler as shown here http://api.jquery.com/ajaxStart/, just by attaching to the .ajaxStart event. But I don't want to show/hide the gif manually on every request too. I need some generic solution.

© Stack Overflow or respective owner

Related posts about AJAX

Related posts about gif