JQuery ajax, Prevent callback from starting

Can I use jQuery ajaxComplete or ajaxStop functions to decide if a callback will be called?

Essentially, I want to have the basic error checking code that is currently found in most of my callbacks, and add it to a kind of global callback.

+1
source share
2 answers

Sort response: None.

Long answer: Both ajaxCompleteand ajaxStopare events jQuery AJAX. You cannot prevent events, and "event" means nothing else but "execute every callback function that has been registered." Callbacks are called independently if you want or not.

, , , ( ) . , , . , , , , .

+1

. , . jQuery ajax, .

0

All Articles