If I want to have synchronous and asynchronous functions execute in a particular order I could use jQuery promise but it doesn\'t seem to work the way I\'d expect it to work
Sidenote: When you use it without the array, you don't have to start with a promise. $.when({}).then(a).then(b) will do the trick just fine. You only need to make sure you don't put a inside the when.