veeran veeran - 1 month ago 20
Ajax Question

ajaxstart not working after sometime

i have this code in my jquery file which works fine but if the site kept idle for some time like 5 minutes,then it is not working.i couldn't able to find why this happens, please suggest me what are the things which affects ajaxStart and ajaxStop or how can i debug this.


jquery


$(document).ajaxStart(function()
{
loading =0;
$(".ajaxLoaderModal").show();
});

Answer

from the jQuery API: If $.ajax() or $.ajaxSetup() is called with the global option set to false, the .ajaxStart() method will not fire.

https://api.jquery.com/ajaxStart/

please check your configuration