I need a callback to execute once after multiple elements have finished animating. My jquery selector is as follows:
$(\'.buttons\').fadeIn(\'fast\',function
var $buttons = $('.buttons'); $buttons.each( function (index) { if ( index == $buttons.length - 1 ) { $(this).fadeIn('fast',function() { // my callback }); } else { $(this).fadeIn('fast'); } });
Untested but this should apply the callback to the last button only.