Is it at all possible to force synchronous and sequential calls to my custom javascript functions with jQuery?
doThis();
doThat();
function doThis() {
// This takes a while, but we only want to do doThat() once doThis() is finished
}
function doThat() {
// This takes much less time, but we only want it to fire off when doThis() is done.
}
With jQuery animation, there’s a nice callback functionality where the animation waits until completion before the callback is called. But is there a way I can do similar for custom functions?