I trying to do an “automatic” load indicator.. for that, I want to listen for ajax events on the application, and show/hide the indicator.
My only problem with this right now, is that I don’t know what events jquery trigger when it’s doing some ajax call ($.ajax, $.post, $.get…)
Docs say anything about it. How can I do that without add extra code to all my calls?
Thanks in advance.
Yes, you can get access to that via
ajaxSetup. There’s alsoajaxStart,ajaxStop, and many others described in the documentation.