As the title says, how can I maintain/control the order of execution of functions in Jquery? I know we can establish many event handler via addEventListener
, but th
I could use callback functions and handle events in these functions.
function helloWorld(hello,callback)
{
//does something here with hello
callback(); //calls the callback function for final execution
}
helloWorld("world",alertUser);
function alertUser(){
alert("I am done with this function");
}
So if I understood your question OK, then I do something like the above.