I make an ajax call with getPropertyId function to get data. I use a callback to get results then I use them. My problem is that the second each loop is launched before the end of the first one even if I put it inside the function. Can I synchronize my code to launch the second loop after the end of the first one ?
Thanks
Plugins.DataHelper.getPropertyId(PropertyID, function(data){
//code using data retrived with getPropertyId function
$.each(list, function(index,value){
//code "A" containing asynchronous calls
});
});
$.each(filtredList, function(index,value){
//code "B"
});
$.each()in the same function as the first one still results in asynchronous behavior?code Acalls asynchronous methods (such as animations, or further AJAX requests)? In that case, you will have to find a way to chaincode Bfrom the last asynchronous callback fromcode A.