- 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: [email protected] [mailto:[EMAIL PROTECTED] 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 [email protected]
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