TPR
TPR

Reputation: 2577

ASP.NET MVC ajax jquery preloader

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

Answers (1)

Zruty
Zruty

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

Related Questions