jquery - Best way to put delay after calling javascript functions -


i'm using jquery call javascript functions delay between them.
i'm using jquery wait

when call below function,all functions called recpectively,there no delays between each other.

$(this) .call(f1) .wait(5000) .call(f2) .wait(5000) .call(f3); 

here call function calls function did

$.fn.call = function (f) {     if (f)         f();      return this; }; 

what doing wrong ? how can achieve ?
thank you

if want call function every 5 seconds use

settimeout(function(){f1},5000); settimeout(function(){f2},10000); settimeout(function(){f2},15000); 

if want call each function 5 seconds after last 1 terminated use

settimeout(function(){f1;settimeout(function(){f2;settimeout(function(){f3},5000);},5000);},5000); 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -