I have a set of functions to run, in sequence, but the first one has an asynchronous sub-function. I want the second highest-level function to run only after the async function completes. Any idea how I do this?
File A:
one();
two(); // I don't want this to run until after one()'s $.ajax success callback
function one() {
doSomethingElse();
$.ajax(url, {data: data}, function(){
// do two();
});
}