Maye you can use setInterval and periodically test if your elem is visible ?
On Tue, Mar 25, 2008 at 5:40 PM, Yuval Hager <[EMAIL PROTECTED]> wrote: > > On Mar 25, 3:35 pm, "Olivier Percebois-Garve" <[EMAIL PROTECTED]> > wrote: > > As I am not Drupal user difficult to understand what you can do or cant. > > Basically with jQuery animations you can pass a function as last param > and > > it > > will be executed after: > > > > $("p").slideDown("slow",function(){ > > alert("Animation Done."); > > > > }); > > > > I wish I could, but this is called from within core drupal and I can't > change it: > > http://cvs.drupal.org/viewvc.py/drupal/drupal/misc/collapse.js?view=markup&pathrev=DRUPAL-5 > > > If you cant change it, it suggest you to use setTimeout with a time > longer > > than the time of the animation. > > I guess it will be ok most of the time, but it wont be bulletproof. > > > > Thanks - I hoped not to get into that and have an event fired when the > element gets into view.. > > (btw, the code I need to run when the animation completes is under > $document.ready() here: > > http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/imagefield_crop/imagefield_crop.js?revision=1.1.2.1&pathrev=DRUPAL-5 > ) > > --yuval >