Hello. I was wondering if anybody could point me in the right direction of creating a cross-fade effect for Ajax.Updater. If you have an element that gets replaced by a new one with Ajax.Updater, how can we blend one into the other? Many thanks. Tench
Andrew Kaspick
2005-Oct-20 13:01 UTC
Re: cross-fade effect on elements updated by ajax.updater?
Could you not run a fade in effect of the new element and a fade out effect of the old element in parallel? That should do it I think. On 10/20/05, Tench <psychomachine-ee4meeAH724@public.gmane.org> wrote:> Hello. > > I was wondering if anybody could point me in the right direction of > creating a cross-fade effect for Ajax.Updater. If you have an element > that gets replaced by a new one with Ajax.Updater, how can we blend > one into the other? > > Many thanks. > Tench > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Not really, because Ajax.Updater replaces the whole div, so I either have the original div on page (before the ajax call), or the new one (after the ajax call). I don''t know how manipulate the two at the same time. On 20. окт 2005., at 15:01, Andrew Kaspick wrote:> Could you not run a fade in effect of the new element and a fade out > effect of the old element in parallel? That should do it I think. > > On 10/20/05, Tench <psychomachine-ee4meeAH724@public.gmane.org> wrote: > >> Hello. >> >> I was wondering if anybody could point me in the right direction of >> creating a cross-fade effect for Ajax.Updater. If you have an element >> that gets replaced by a new one with Ajax.Updater, how can we blend >> one into the other? >> >> Many thanks. >> Tench >> _______________________________________________ >> 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 >
Andrew Kaspick
2005-Oct-20 13:57 UTC
Re: cross-fade effect on elements updated by ajax.updater?
Ok, what about doing a fade out before the updater replaces the div and then fade in the new div after the updater has run. If you don't have both divs around at the same time, then I don't see what you could do unless you keep that original div around for the sole purpose of cross fading. So basically, don't remove the div (or make a copy of it to use for the fade) until after the updater has completed. Otherwise, you can't crossfade something that isn't there. On 10/20/05, Tench <psychomachine@mac.com> wrote:> Not really, because Ajax.Updater replaces the whole div, so I either > have the original div on page (before the ajax call), or the new one > (after the ajax call). I don't know how manipulate the two at the > same time. > > On 20. окт 2005., at 15:01, Andrew Kaspick wrote: > > > Could you not run a fade in effect of the new element and a fade out > > effect of the old element in parallel? That should do it I think. > > > > On 10/20/05, Tench <psychomachine@mac.com> wrote: > > > >> Hello. > >> > >> I was wondering if anybody could point me in the right direction of > >> creating a cross-fade effect for Ajax.Updater. If you have an element > >> that gets replaced by a new one with Ajax.Updater, how can we blend > >> one into the other? > >> > >> Many thanks. > >> Tench > >> _______________________________________________ > >> Rails-spinoffs mailing list > >> Rails-spinoffs@lists.rubyonrails.org > >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > >> > >> > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.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
Mark Chadwick
2005-Oct-20 14:14 UTC
Re: cross-fade effect on elements updated by ajax.updater?
A simpler hack (if you can have absolute positions for the elements), is to just put the second div directly under the first. Fade out the first, and the second "fades in." Fade the first back in, and the second one "fades out." Just a thought. On 10/20/05, Andrew Kaspick <akaspick@gmail.com> wrote:> Ok, what about doing a fade out before the updater replaces the div > and then fade in the new div after the updater has run. If you don't > have both divs around at the same time, then I don't see what you > could do unless you keep that original div around for the sole purpose > of cross fading. So basically, don't remove the div (or make a copy > of it to use for the fade) until after the updater has completed. > Otherwise, you can't crossfade something that isn't there. > > On 10/20/05, Tench <psychomachine@mac.com> wrote: > > Not really, because Ajax.Updater replaces the whole div, so I either > > have the original div on page (before the ajax call), or the new one > > (after the ajax call). I don't know how manipulate the two at the > > same time. > > > > On 20. окт 2005., at 15:01, Andrew Kaspick wrote: > > > > > Could you not run a fade in effect of the new element and a fade out > > > effect of the old element in parallel? That should do it I think. > > > > > > On 10/20/05, Tench <psychomachine@mac.com> wrote: > > > > > >> Hello. > > >> > > >> I was wondering if anybody could point me in the right direction of > > >> creating a cross-fade effect for Ajax.Updater. If you have an element > > >> that gets replaced by a new one with Ajax.Updater, how can we blend > > >> one into the other? > > >> > > >> Many thanks. > > >> Tench > > >> _______________________________________________ > > >> Rails-spinoffs mailing list > > >> Rails-spinoffs@lists.rubyonrails.org > > >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >> > > >> > > > _______________________________________________ > > > Rails-spinoffs mailing list > > > Rails-spinoffs@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.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