Invoking a jQuery function after .each() has completed

It’s probably to late but i think this code work…

$blocks.each(function(i, elm) {
 $(elm).fadeOut(200, function() {
  $(elm).remove();
 });
}).promise().done( function(){ alert("All was done"); } );

Leave a Comment