javascript - how can I call another function after completing each function? -


$('.chide').each(function(index) {         settimeout(function(el) {         el.animate({opacity:0});        }, index * 200, $(this));  }); 

i want run function after completed above function how can please help..

if app/site can use modern features use promises.

promise.all(arrayofpromises).then(function(arrayofresults) {   //... }); 

its sane way of organizing code, solid polyfills available: http://www.html5rocks.com/en/tutorials/es6/promises/


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -