After attempting to run a for loop 10 times with setInterval to call my function again, I realized that my for loop only runs ten times. How can I fix this issue?
function randomThumbNews() {
for(var i=0;i<10;i++){
$.ajax({
type: "get", url: "Home/Oku", data: {},
success: function (data) {
$("#thumbNews_" + i).html(data);
}
});
}
}
setInterval(randomThumbNews, 3000);