Answer the question
In order to leave comments, you need to log in
How to translate ajax request after 30 seconds from success to error?
I have a list of urls that differ from each other only by a number, like this:
"http://site1.ru", "http://site2.ru", "http://site3.ru"
myajax();
function myajax(counter = 1) {
$.ajax({
type: 'GET',
url: 'http://site'+counter+'.ru',
success: function(response){
myajax(counter++);
}
});
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question