Reputation: 2577
so I know you could use show() and hide() of jquery during onbegin and oncomplete events of ajax calls to approach the ajax preloader effect.
What I want to know is is there a way to do it across the board? instead of manually going to each ajax form and adding onbegin and oncomplete functions etc.
Upvotes: 0
Views: 667
Reputation: 8667
Check out the jQuery.ajaxSend() and jQuery.ajaxComplete() events: they allow you to specify the common handler for all AJAX requests.
Upvotes: 1