if I have a synchronous communication ajax ($.ajax function), how to set a timeout for the ajax.
When the countdown ends, via function or any way to return false.
I want to achieve this approach:
ex:
if $.ajax is not timeout
=> call function A() or do something;
else if $.ajax is timeout
=> call function B() or do something;
maybe, detection the working time through other function,ex: javascript setInterval();,setTimeout(); ?