How to wait for effect queue completion?

0 views
Skip to first unread message

TTop

unread,
Sep 29, 2007, 1:45:44 PM9/29/07
to Ruby on Rails: Spinoffs
I'd like to wait for an effect queue to be empty before proceeding
with code execution. How can I do this?

In this case, I'd like to fade out a div, modify it and then fade it
back in, but I don't want the modification to start until I know it's
completely faded out.

TTop

unread,
Sep 29, 2007, 1:47:35 PM9/29/07
to Ruby on Rails: Spinoffs
I should clarify... this is with scriptaculous.

Thomas Fuchs

unread,
Sep 30, 2007, 8:13:11 AM9/30/07
to rubyonrail...@googlegroups.com
You can use Effect.Event for this:

new Effect.Event({queue:'end',afterFinish:function(){
// your code
});

Reply all
Reply to author
Forward
0 new messages