I have a function that do multiple ajax call and I have to make those call 1 by 1
At the beginning of the function I disable the button add to cart and I show a div with an animated image (loading gif), then , I loop through all my ajax call.
function add_cart_tour()
{
// this code is executed after my ajax call ...
$("#btn_ajouter").prop('disabled' , true);
$("#please_wait").show();
// loop in all call
// when all call are done, I redirect the user to the cart page
}
Why this async false call is blocking the code before I even made the call ?