I''m using puff effect on an img obj, bind to the onclick event. Though after the effect is done I want the img to reappear. I tried Effect.toggle(...) but to no avail. Is it possible to check for the item''s visibility status and make it appear or do I need a counter to make this happen after a specified period? Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hye there, this are some snippets that works for me, Effect.Puff(''divSplash'', {duration:3}); var t=setTimeout("Effect.Appear(''divSplash'')",3000) note: - divSplash will puff within 3 seconds. - after 3 seconds more, it''ll reappear again. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hey there, darkmatter a écrit :> Hye there, > this are some snippets that works for me, > > Effect.Puff(''divSplash'', {duration:3}); > var t=setTimeout("Effect.Appear(''divSplash'')",3000) > > note: > - divSplash will puff within 3 seconds. > - after 3 seconds more, it''ll reappear again.Just so you know: The better way (that avoid setting a timer you don''t seem to clear) is to use the afterFinish callback option on the first effect. Also, please always use "new " before your effect names, to allow for proper parallel execution. new Effect.Puff(''divSplash'', { duration: 3, afterFinish: function() { new Effect.Appear(''divSplash'') } }); For longer sequences, use Effect Queues. -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: 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 -~----------~----~----~----~------~----~------~--~---
That will do the trick. Thanks for the support :) On Oct 10, 11:06 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Hey there, > > darkmatter a écrit : > > > Hye there, > > this are some snippets that works for me, > > > Effect.Puff(''divSplash'', {duration:3}); > > var t=setTimeout("Effect.Appear(''divSplash'')",3000) > > > note: > > - divSplash will puff within 3 seconds. > > - after 3 seconds more, it''ll reappear again.Just so you know: > > The better way (that avoid setting a timer you don''t seem to clear) is > to use the afterFinish callback option on the first effect. Also, > please always use "new " before your effect names, to allow for proper > parallel execution. > > new Effect.Puff(''divSplash'', { duration: 3, > afterFinish: function() { new Effect.Appear(''divSplash'') } > > });For longer sequences, use Effect Queues. > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: t...-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 -~----------~----~----~----~------~----~------~--~---