How to fire multiple JavaScript functions at once -
how fire these 4 functions @ same time;
firethisnow1(); firethisnow2(); firethisnow3(); firethisnow4();
you mean asynchronously yes? try this:
settimeout(function(){ firethisnow1(); }, 0); settimeout(function(){ firethisnow2(); }, 0); settimeout(function(){ firethisnow3(); }, 0); settimeout(function(){ firethisnow4(); }, 0);
same (if parent object window):
for(var = 1; < 5; i++){ settimeout(function(){ window['firethisnow' + i](); }, 0); }
Comments
Post a Comment