I want to extend the ajax function so that whenever it is called an image appears on the page that indicates there is content loading.
I can use prefilters as discussed on this page http://api.jquery.com/extending-ajax/ to show the image but how could I hide the image once the request is complete?
Please have a look here: Global Ajax Event Handlers
These make it trivial to implement a loading image whenever an ajax request is sent through jQuery. No extending needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With