safiot safiot - 7 months ago 42
jQuery Question

jquery: how to check if a page is performing an ajax request?

I want to build a function that fires with every ajax request. Like showing "loading...". I am using Jquery is that possible?


Yes, this is totally possible. Start with the global ajax handlers here .ajaxStart() and .ajaxStop() events are the most likely candidate to show your status indicator.