Disabling some jQuery global Ajax event handlers for a request

后端 未结 4 1491
故里飘歌
故里飘歌 2020-12-02 17:01

Suppose that I have some global Ajax event handlers defined (ajaxStart, ajaxStop, and ajaxError). Usually I am fine with that, but for one request, I want to disable the aja

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-02 17:22

    try to use global: false in your ajax request like:

     $.ajax({
       url: "test.html",
       global: false,
       // ...
     });
    

    source:: http://docs.jquery.com/Ajax_Events

    Look for Global Events.

提交回复
热议问题