Hi all, If I call this function bla: function bla() { Effect.Appear('some_element'); Effect.Appear('some_other_element'); } Both effect happen at the same time. Is there a way to stop this from happening? I mean, how can I delay the effect on 'some_other_element' from happening until the effect on 'some_element' is finished? thanks and regards, Jeroen _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
http://www.railsdevelopment.com/2006/01/15/effectqueue/ - David Am 21.02.2006 um 13:40 schrieb Jeroen Verhagen:> Hi all, > > If I call this function bla: > > function bla() { > Effect.Appear(''some_element''); > Effect.Appear(''some_other_element''); > } > > Both effect happen at the same time. Is there a way to stop this from > happening? I mean, how can I delay the effect on ''some_other_element'' > from happening until the effect on ''some_element'' is finished? > > thanks and regards, > > Jeroen > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
On 2/21/06, David Zülke <dz@bitxtender.com> wrote:> http://www.railsdevelopment.com/2006/01/15/effectqueue/Many, many thanks, Jeroen _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Also, you could use the following... I assume either this technique or the queue method has their own advantages depending on the situation, but I''m just showing you this since it seems you may not be aware that it exists. function bla() { Effect.Appear(''some_element'', { afterFinish: function() { Effect.Appear(''some_other_element''); } }); } -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of David Zülke Sent: Tuesday, February 21, 2006 6:44 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] non simultaneous effects http://www.railsdevelopment.com/2006/01/15/effectqueue/ - David Am 21.02.2006 um 13:40 schrieb Jeroen Verhagen:> Hi all, > > If I call this function bla: > > function bla() { > Effect.Appear(''some_element''); > Effect.Appear(''some_other_element''); > } > > Both effect happen at the same time. Is there a way to stop this from > happening? I mean, how can I delay the effect on ''some_other_element'' > from happening until the effect on ''some_element'' is finished? > > thanks and regards, > > Jeroen > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.
Hi Ryan, On 2/21/06, Ryan Gahl <Ryan.Gahl@camtronics.com> wrote:> Also, you could use the following... I assume either this technique or the queue method has their own advantages depending on the situation, but I'm just showing you this since it seems you may not be aware that it exists.I wasn't aware of this but it seems very useful also for other things that avoiding simultaneous effects. I will look into it... Thanks and regards, Jeroen _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I''d like an OS X like Puff effect. For those who don''t know, this keeps the original object during the puff effect. Is there some simple option or do you have to do it yourself? I tried it something like this var self = this; var original = this.getElementsByTagName("img")[0]; var img = original.cloneNode(false); img.style.position = "absolute"; img.style.offsetTop = original.style.offsetTop; img.style.offsetLeft = original.style.offsetLeft; img.style.scrollTop = original.style.scrollTop; img.style.scrollLet = original.style.scrollLeft; this.appendChild(img); Effect.Puff(img, {afterFinish: function() { self.removeChild (img); }}); (basicly cloning the original image (in this case) and applying the puff effect to the clone) I got tired when the clone wouldn''t align itself perfectly with the original and thought I''d ask before venturing further :) Andreas
Have you tried Position.clone? On 3/7/06, Andreas Wahlin <andreaswahlin-cgr7CL/LOSDk1uMJSBkQmQ@public.gmane.org> wrote:> > I''d like an OS X like Puff effect. For those who don''t know, this > keeps the original object during the puff effect. Is there some > simple option or do you have to do it yourself? > > I tried it something like this > > var self = this; > var original = this.getElementsByTagName > ("img")[0]; > var img = original.cloneNode(false); > img.style.position = "absolute"; > img.style.offsetTop > original.style.offsetTop; > img.style.offsetLeft > original.style.offsetLeft; > img.style.scrollTop > original.style.scrollTop; > img.style.scrollLet > original.style.scrollLeft; > > this.appendChild(img); > Effect.Puff(img, {afterFinish: function() > { self.removeChild > (img); }}); > > (basicly cloning the original image (in this case) and applying the > puff effect to the clone) > I got tired when the clone wouldn''t align itself perfectly with the > original and thought I''d ask before venturing further :) > > Andreas > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Yep, thanks a bunch. I should look through the Prototype functions as well a bit better in the future :) Andreas On Mar 7, 2006, at 16:11 , Joseph Potenza wrote:> Have you tried Position.clone? > > On 3/7/06, Andreas Wahlin <andreaswahlin-cgr7CL/LOSDk1uMJSBkQmQ@public.gmane.org> wrote: > I''d like an OS X like Puff effect. For those who don''t know, this > keeps the original object during the puff effect. Is there some > simple option or do you have to do it yourself? > > I tried it something like this > > var self = this; > var original = > this.getElementsByTagName ("img")[0]; > var img = original.cloneNode(false); > img.style.position = "absolute"; > img.style.offsetTop = > original.style.offsetTop; > img.style.offsetLeft = > original.style.offsetLeft; > img.style.scrollTop = > original.style.scrollTop; > img.style.scrollLet = > original.style.scrollLeft; > > this.appendChild(img); > Effect.Puff(img, {afterFinish: > function() { self.removeChild > (img); }}); > > (basicly cloning the original image (in this case) and applying the > puff effect to the clone) > I got tired when the clone wouldn''t align itself perfectly with the > original and thought I''d ask before venturing further :) > > Andreas > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs