Skip to content

Instantly share code, notes, and snippets.

@voising
Created June 15, 2013 23:16
Show Gist options
  • Save voising/5789976 to your computer and use it in GitHub Desktop.
Save voising/5789976 to your computer and use it in GitHub Desktop.
JQUERY : Animation after fadeOut #fadeoutlast
// The fadeOut() callback execute the function for each element. Sometimes we just need the function to be executed on the last element
lis = $('#menu li');
var i = lis.length;
lis.fadeOut(300, function(){
if (!--i) {
$('#element_to_animate').slideDown(300);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment