Hi, i wonder if there is a simple way to have the following functionality: * Ajax.updater calls a partial html for ''foo_id'' * the new content will Fade in at ''foo_id'' For now the only way i found was to update a hidden div, absolutize, clone position and than Fade. Is ther a build in way that i am missing ?? Best T --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Why would you need to absolutize and clone position ? Something like this should do the trick (untested) new Ajax.Updater(''foo_id'', url, { onSuccess: function() { $(''foo_id'').setOpacity(0).appear(); } }) On Sep 4, 10:14 am, trigan <doris.me...-nRXsrdlcZ0WELgA04lAiVw@public.gmane.org> wrote:> Hi, > > i wonder if there is a simple way to have the following functionality: > > * Ajax.updater calls a partial html for ''foo_id'' > * the new content will Fade in at ''foo_id'' > > For now the only way i found was to update a hidden div, absolutize, > clone position and than Fade. > > Is ther a build in way that i am missing ?? > > Best > T--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
i want to transpose the ''foo_id'', that means i want do fade out the old one and fade in the new one at the same position. so i''d suggest that the new container has to be first positioned below (zIndex) the old one. After that the old container could be faded out. Your example would (i suggest - have to try it) delete the old one, (with a flickering as a result) and than fade in the new one... On 4 Sep., 12:55, Tobie Langel <tobie.lan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Why would you need to absolutize and clone position ? > > Something like this should do the trick (untested) > > new Ajax.Updater(''foo_id'', url, { > onSuccess: function() { > $(''foo_id'').setOpacity(0).appear(); > } > > }) > > On Sep 4, 10:14 am, trigan <doris.me...-nRXsrdlcZ0WELgA04lAiVw@public.gmane.org> wrote: > > > Hi, > > > i wonder if there is a simple way to have the following functionality: > > > * Ajax.updater calls a partial html for ''foo_id'' > > * the new content will Fade in at ''foo_id'' > > > For now the only way i found was to update a hidden div, absolutize, > > clone position and than Fade. > > > Is ther a build in way that i am missing ?? > > > Best > > T--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
hi, are you waiting for user input in any of the containers? If not it is not necessary to switch the z- index. Just either switch the visibility (visilbility:hidden; -> visibility:show) or set the opacity as suggested before. hope that helps Bastian On 9/4/07, trigan <doris.meyer-nRXsrdlcZ0WELgA04lAiVw@public.gmane.org> wrote:> > i want to transpose the ''foo_id'', that means i want do fade out the > old one and fade in the new one at the same position. > so i''d suggest that the new container has to be first positioned > below (zIndex) the old one. After that the old container could be > faded out. > > Your example would (i suggest - have to try it) delete the old one, > (with a flickering as a result) and than fade in the new one... > > On 4 Sep., 12:55, Tobie Langel <tobie.lan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Why would you need to absolutize and clone position ? > > > > Something like this should do the trick (untested) > > > > new Ajax.Updater(''foo_id'', url, { > > onSuccess: function() { > > $(''foo_id'').setOpacity(0).appear(); > > } > > > > }) > > > > On Sep 4, 10:14 am, trigan <doris.me...-nRXsrdlcZ0WELgA04lAiVw@public.gmane.org> wrote: > > > > > Hi, > > > > > i wonder if there is a simple way to have the following functionality: > > > > > * Ajax.updater calls a partial html for ''foo_id'' > > > * the new content will Fade in at ''foo_id'' > > > > > For now the only way i found was to update a hidden div, absolutize, > > > clone position and than Fade. > > > > > Is ther a build in way that i am missing ?? > > > > > Best > > > T > > > > >-- -- spread the word ... see www.browsehappy.com ;o) Calvin: Weekends don''t count unless you spend them doing something completely pointless. Join the Greater IBM Connection (http://www.xing.com/premiumgroup-6291.d26b7d) --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
but those methods will not lead to a smooth transition from the old container to the new one - or do i miss one simple point here ?? i tried it with two divs containing an image of the same size. ok, the images will switch but i want to have an Effect.Fade (or Appear) with an duration of about 0.7 secs --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
If you have two images, one below the other, and you fade the uppermost one, the bottom one will fade in perfectly. The top image acts as an alpha mask for the bottom. The bottom image needs to be there before you begin the fade. Walter On Sep 4, 2007, at 8:02 AM, trigan wrote:> > but those methods will not lead to a smooth transition from the old > container to the new one - or do i miss one simple point here ?? > > i tried it with two divs containing an image of the same size. > > ok, the images will switch but i want to have an Effect.Fade (or > Appear) with an duration of about 0.7 secs > > > > >--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Walter,> If you have two images, one below the other, and you fade the uppermost > one, the bottom one will fade in perfectly. The top image acts as an > alpha mask for the bottom.Thank you for your confirmation. That is exactly the way i do it for now. But i wondered if there is a more generic and build in way. i''d suggest something like Ajax.Transposer(''id'',''url'', { leaveScene: new Effect...., enterScene: new Effect...., }) while all ''old'' ids within the leaving Fragment will be prepended with ''old_'' When i have finished my current project i''ll try to write a piece of working code for this... Best T --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
I''d suggest using the Ajax.Request instead, Ajax.Updater is a convenience class to handle easy updates, when you start thinking about behavior you have more control over the transition with Ajax.Request. All Ajax.Updater is doing for you is stuffing the responseText in the innerHTML property of the element you send to the constructor. So just make sure to carry this feature over to the success handler for Ajax.Request. onSuccess : function(transport){ new Effect.Fade("myDiv", { afterFinish : function(fx){ fx.element.innerHTML = transport.responseText; fx.element.appear()}); } On Sep 5, 4:09 am, trigan <doris.me...-nRXsrdlcZ0WELgA04lAiVw@public.gmane.org> wrote:> Hi Walter, > > > If you have two images, one below the other, and you fade the uppermost > > one, the bottom one will fade in perfectly. The top image acts as an > > alpha mask for the bottom. > > Thank you for your confirmation. That is exactly the way i do it for > now. But i wondered if there is a more generic and build in way. > i''d suggest something like Ajax.Transposer(''id'',''url'', { leaveScene: > new Effect...., enterScene: new Effect...., }) while all ''old'' ids > within the leaving Fragment will be prepended with ''old_'' > > When i have finished my current project i''ll try to write a piece of > working code for this... > > Best > T--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---