How to invoke a function on each element without timing?
Classical syntax:
1
$('.many').each(function(i,elem){ … });
Similar patterns with callbacks
- How to
invoke a single function after a timeout?$.wait(timeout, function(){ … });
- How to
invoke a callback at some specific point in the timeline?$some.timingStuff().then(callback).doMore();
- How to
concatenate function calls with timeouts?$.wait(first-timeout, function(){ … }) .wait(second-timeout, function(){ … }) .wait(third-timeout, function(){ … });
- How to
repeat a single callback on interval?$.repeat(interval, function(){ … });