Skip to content

Instantly share code, notes, and snippets.

@user24
Created August 1, 2014 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save user24/a225b8874df3299aa3c5 to your computer and use it in GitHub Desktop.
Save user24/a225b8874df3299aa3c5 to your computer and use it in GitHub Desktop.
// Hide all miniapps.
// for promise().done() explanation, see http://api.jquery.com/promise/#example-1
// tldr; if you put a .complete() callback in an animation which matches > 1 element
// the callback will be called once per matching element
// We don't want that, we want the callback to run once all animations are complete.
$('.miniapp').slideUp("fast").promise().done(function runMeWhenAllSlideupsAreComplete() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment