Reputation: 51383
//trigger
fMain(fAfter1());
function fMain(callback()){
//do stuff here and then...
callback();
}
function fAfter1(){
}
function fAfter2(){
}
It seems that the callback isn't waiting to be triggered like I hoped it would.
Thanks!
Upvotes: 1
Views: 50
Reputation: 4795
The definition should be function fMain(callback){
, not function fMain(callback()){
-- I'm not sure if that's what's causing your problem.
Upvotes: 4