This is easy enough to work around, but it would be nice if it was wrapped up in the global ajax setup
When I run an ajax call, I’d like to know which element/event trigger the ajax call in the beforeSend option.
Is there a concise way of doing this?
The
beforeSendcallback takes two arguments: theXMLHTTPRequestinstance and the settings used by the current AJAX call.Therefore, if you pass the triggering element and event in the
contextoption, they will be available tobeforeSendeven if you define it in the global setup: