function closeMainPanels(callback){ var panels = jQuery('div.mainLiner div.panel'); var done = []; var length = panels.length; panels.each(function(){ var panel = jQuery(this); panel.slideUp(750, function(){ if (done.push(panel) == length){ callback(); } }); }); }
This is what I ended up using thanks brian. :) Cheers, Cam On Thu, Jan 1, 2009 at 5:26 PM, Cam Spiers <camspi...@gmail.com> wrote: > Hey, > > function closeMainPanels(){ > jQuery("div.mainLiner div.panel").each(function(){ > jQuery(this).slideUp(750); > }); > } > > How can I tell when all panels have finished animation? > > As I need to call another function when all have finished. > > Cheers, > Cam > > > > > > > >