Christophe Porteneuve wrote:
> Well, effects are executed asynchronously, so of course your remove call 
> happens right after the effect *starts*.  Also, you should always invoke 
> effects using the "new" operator, to ensure proper execution.
> 
> If you need to remove the element once the effect is complete, use the! 
> afterFinish callback:
> 
> new Effect.Fade(row_id, { afterFinish: function() { Element.remove(row_id) } 
> });
> 
> Beware: this won't work in a loop, as row_id will be shared reference. 
> However, if you need a single call within the scope of declaration of this
> row_id variable, you're good to go.

Hi Cristophe,
thanks for the fast reply! Unfortunately, afterFinish callback won't work for
me, because I'm creating another element with the id of the removed row. Is
there a way to tell the Effect to execute synchronously?

--
Sava Chankov


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to