I'm trying to make an httpost like below. I want the js to work independent from below ajax which is called per 5 seconds. But it's not working async. It behaves as sync. It blocks the js during ajax. Can you please help me to understand the problem ?
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "../Home/GetMobiles",
data: JSON.stringify(model),
dataType: "json",
async: true,
success: function(data)
{
DivLd.style.display = "none";
SetMoving(data);
glob = data;
},
error: function(xhr, err) {
GetToken();
}
});