javascript - Multiple timers on the same page don't work smoothly -


i have 3 javascript timers working @ same time on page using settimeout, functions called these timers not working smoothly , seems timers waiting on each other, , times hang page.

is there best practice when dealing js timers avoid behavior?

examples:

sometimes use jquery timers this:

$(document).everytime(1000, "blinkred", function (i) {       $(price).toggleclass('valuered'); }, 10); 

and use normal settimeout javascript function.

the timers not waiting each other, functions called when timer done, are. so, when put blocking code (like alert) in first timer function, prevent other timers go off.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -