Created
August 20, 2014 17:26
-
-
Save richardh-vccp/886f134cd414fc20cc93 to your computer and use it in GitHub Desktop.
jQuery deferred animation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.when( | |
$('.elem-one').animate({ left: 25, width: 200 }, 500, 'easeOutElastic') | |
).then(function() { | |
$('.elem-two').animate({ width: 150 }, 500, 'easeOutElastic') | |
return $('.elem-one').animate({ top: 108 }, 500, 'easeOutElastic') | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment