Reputation: 1236
I have a complex site with lots of jquery loads in various places and in different files. I want to have a single method which renders a loading popup when any of the ajax loads run, without (hopefully) modifying them all.
Anyone know a way to 'catch' any ajax request start, and also the request end?
Thanks
Upvotes: 1
Views: 183
Reputation: 10411
I believe what you want to do is register for the ajaxStart and ajaxStop events. These will fire for any jQuery ajax events.
Upvotes: 1
Reputation: 16936
See here. The complete and beforeSend events to achieve the behaviour you are looking for.
Upvotes: 0