both animations should have same speed not!
the jquery promise quicker can measure eyes ;-)
why that? technically same , chaining jquery functions.
$.when( $('#a1').fadeout() ) .done( $('#a2').fadein() ); vs. $('#a1').fadeout(function () { $('#a2').fadein(function () { }); });
do instead:
$.when( $('#a1').fadeout() ).done(function() { $('#a2').fadein() }); notice added function() {} around fadein(). not having part causes code execute fadein() instead of passing function parameter done() function.
Comments
Post a Comment