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
Post a Comment