Furthermore, I discovered the afterFinish callback but it still does
not work :(

I have used the code:

Effect.toggle('myElem', 'slide', { afterFinish:alert("it has
finished") });

But the alert is displayed before the effect has finished...

Is this a bug?

On Jun 19, 11:45 am, wellmoon <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm using the Effect.toggle('myElem', 'slide') effect to open and
> close a div. I'd like a callback function to be executed once the
> effect has finished. I tried adding the function like this:
>
> Effect.toggle('myElem', 'slide', function() {
>   //do something fun here
>
> });
>
> But this did not work. How can I execute a function once the effect
> has finished?  I tried just adding a normal function after the
> Effect.toggle line of code, but the function gets executed before the
> effect has finished...
>
> I'd like to avoid using setTimeout if possible....
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to