[Proto-Scripty] Re: Effect.Event d

2009-09-22 Thread tomkiller44

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"  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  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 prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Effect.Event d

2009-08-21 Thread T.J. Crowder

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  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 prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---