Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extending jQuery's ajax function

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?

like image 647
Mike Avatar asked Dec 17 '22 06:12

Mike


1 Answers

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.

like image 85
rossipedia Avatar answered Dec 26 '22 10:12

rossipedia