I feel like I''m missing something obvious, but I looked at the script.aculo.us wiki and the code in effects.js and I can''t find what I''m looking for. I''d like to be able to execute a callback after an effect is finished. I could use setTimeout with the same value I use for duration and do it myself, but that seems kludgy. Is there no onComplete callback for effects? Thanks, -- Michael Peters Developer Plus Three, LP --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Peters wrote:> Is there no onComplete callback for effects?Nevermind, I found it and it''s called "afterFinish". -- Michael Peters Developer Plus Three, LP --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hey Michael, Michael Peters a écrit :> seems kludgy. Is there no onComplete callback for effects?You''re looking for the afterFinish callback option. The callbacks are: - beforeStart (one time, just before being added to the queue, if any) - beforeSetup / afterSetup (one time, first rendering) - beforeUpdate / afterUpdate (n times, each rendering) - beforeFinish / afterFinish (one time, end of effect) -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
- new Effect.whatever( <element>, {afterFinish:functionPointer}
Example
- function myAfterFinishFunction()
- {
- alert("Effect done!")
- }
-
- var myEffect = new Effect.BlindDown( $(''myDiv''),
{afterFinish:myAfterFinishFunction});
Note the lack of parentheses after myAfterFinishFunction, this effectively
passes the address of the function rather than executing it and returning the
return value.
-Andrew Martinez
-----Original Message-----
From: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
[mailto:rubyonrails-spinoffs@googlegroups.com]On Behalf Of Michael Peters
Sent: Tuesday, February 06, 2007 12:40 PM
To: Prototype/Scriptaculous
Subject: [Rails-spinoffs] onComplete for Effects
I feel like I''m missing something obvious, but I looked at the
script.aculo.us
wiki and the code in effects.js and I can''t find what I''m
looking for. I''d like
to be able to execute a callback after an effect is finished. I could use
setTimeout with the same value I use for duration and do it myself, but that
seems kludgy. Is there no onComplete callback for effects?
Thanks,
--
Michael Peters
Developer
Plus Three, LP
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---