How I can do the following operation with jQuery:
- Some library send ajax request via $.ajax
- I need to catch all these requests, and in some cases abort them, and instead pass off another data.
I found, that in jQuery 1.5
there were introduced new methods, such as ajaxPrefilter
and ajaxTransport
. I also tried ajaxSetup
with beforeSend
,
but I can't achieve 2 points of these working...