$( ".scene" ) .animate({opacity: "0"}, 1000, "linear") .promise().done(function(){ // animations are finished, run code });