Skip to content

Instantly share code, notes, and snippets.

@richardh-vccp
Created August 20, 2014 17:26
Show Gist options
  • Save richardh-vccp/886f134cd414fc20cc93 to your computer and use it in GitHub Desktop.
Save richardh-vccp/886f134cd414fc20cc93 to your computer and use it in GitHub Desktop.
jQuery deferred animation
$.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