Actually you're right, it is fine in this case to your afterFinish. However, in some cases, I have a lot of code I want to execute after the animation. Still, I try to do the trick (not finished yet).
On 21 août, 15:43, "T.J. Crowder" <[email protected]> wrote: > Hi, > > Why not just use the afterFinish on the effect itself? I don't see > the need for queuing here. > > To fade and remove, I think this should do it (note I'm using fade, > not toggle): > > $('invitation_row_1').fade({ > duration: 0.5, > afterFinish: function(effect) { > effect.element.remove(); > } > }); > > HTH, > -- > T.J. Crowder > tj / crowder software / com > Independent Software Engineer, consulting services available > > On Aug 21, 11:40 am, tomkiller44 <[email protected]> wrote: > > > > > Hi, > > > I am using Scriptaculous through RoR and still be confused with the > > queue and Effect.Event. > > I want to fade out a row in a table before removing it from the DOM. > > > I do this: > > > Effect.toggle("invitation_row_1",'appear',{duration:0.5, > > queue:'remove'}); > > new Effect.Event({queue: 'remove', afterFinish:function(){ > > Element.remove("invitation_row_1"); > > > }} > > > The row is deleted without (or before) any fading effect. > > > Has someone any idea why removal does not wait until effect > > completion? > > > Cheers, > > > Thomas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
