Has anyone used the built in FAT (Fade Anything Technique) that exists in 0.11.1 of Rails? I could not find anything in the documentation so I was wondering if anyone has any code snippets on how they used it? Thanks for your help. John
Use :complete => ''new Effect.Highlight($(''id_of_your_element''))'' when calling ajax helpers, like link_to_remote, or form_remote_tag. Thomas Am 29.03.2005 um 22:48 schrieb John Kopanas:> Has anyone used the built in FAT (Fade Anything Technique) that exists > in 0.11.1 > of Rails? I could not find anything in the documentation so I was > wondering if > anyone has any code snippets on how they used it? > > Thanks for your help. > > John > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
> :complete => ''new Effect.Highlight($(''id_of_your_element''))''You can even get rid of the explicit $(), so it''s just:> new Effect.Highlight(''id_of_your_element'')-- David Heinemeier Hansson, http://www.basecamphq.com/ -- Web-based Project Management http://www.rubyonrails.org/ -- Web-application framework for Ruby http://www.loudthinking.com/ -- Broadcasting Brain
Just out of curiousity, what does this effect do? Where can I find out more on AJAX effects (and AJAX in general) in rails? Thanks Duane Johnson (canadaduane) On Tue, 29 Mar 2005 15:48:00 -0500, John Kopanas <john.kopanas-O1KSuMybMhqBUy7/sJONFg@public.gmane.org> wrote:> Has anyone used the built in FAT (Fade Anything Technique) that exists in 0.11.1 > of Rails? I could not find anything in the documentation so I was wondering if > anyone has any code snippets on how they used it? > > Thanks for your help. > > John > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
> Has anyone used the built in FAT (Fade Anything Technique) that exists > in 0.11.1 > of Rails? I could not find anything in the documentation so I was > wondering if > anyone has any code snippets on how they used it?Just in case he doesn''t post this himself: Matt McCray''s just released the source code for a really lovely to-do list application. He uses Ajax all over the place, including the fade technique and some other DHTML effects. (It''s also a nice example of how to add user authorization on top of the Login Generator''s user authentication.) http://darthapo.com/repos/taskthis.html
I don''t see the fade technique anywhere in this application. Do you know where it is specifically? Is it possible it does not show up on safari? On 29-Mar-05, at 8:22 PM, Andrew Otwell wrote:> >> Has anyone used the built in FAT (Fade Anything Technique) that >> exists in 0.11.1 >> of Rails? I could not find anything in the documentation so I was >> wondering if >> anyone has any code snippets on how they used it? > > Just in case he doesn''t post this himself: Matt McCray''s just released > the source code for a really lovely to-do list application. He uses > Ajax all over the place, including the fade technique and some other > DHTML effects. (It''s also a nice example of how to add user > authorization on top of the Login Generator''s user authentication.) > > http://darthapo.com/repos/taskthis.html > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
I think I see it--after adding a tasklist, create a task, then check the task as "done", and finally, uncheck that task so it goes back to the tasks still to do. As it does so, there is a yellow fade. Duane P.S. Andrew, thanks for the post! On Tue, 29 Mar 2005 22:44:23 -0500, Jonathan Kopanas <john.kopanas-O1KSuMybMhqBUy7/sJONFg@public.gmane.org> wrote:> I don''t see the fade technique anywhere in this application. Do you > know where it is specifically? Is it possible it does not show up on > safari? > > On 29-Mar-05, at 8:22 PM, Andrew Otwell wrote: > > > > >> Has anyone used the built in FAT (Fade Anything Technique) that > >> exists in 0.11.1 > >> of Rails? I could not find anything in the documentation so I was > >> wondering if > >> anyone has any code snippets on how they used it? > > > > Just in case he doesn''t post this himself: Matt McCray''s just released > > the source code for a really lovely to-do list application. He uses > > Ajax all over the place, including the fade technique and some other > > DHTML effects. (It''s also a nice example of how to add user > > authorization on top of the Login Generator''s user authentication.) > > > > http://darthapo.com/repos/taskthis.html > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
John Kopanas wrote:> Has anyone used the built in FAT (Fade Anything Technique) that exists in 0.11.1 > of Rails? I could not find anything in the documentation so I was wondering if > anyone has any code snippets on how they used it?Here are three simple Ajax examples I wrote as an exercise in learning Ajax on RoR. Example 1: Click link to fade text. Example 2: Click link to fetch and then fade server time. Example 3: Send text input to server as it is typed then echo it back with a fade. Controller ---------- def ajax # Just render ajax.rhtml end def time render_text Time::now.to_s end def echo_value render_text @params[:value] end View ---- Attached file ajax.rhtml> > Thanks for your help. > > John > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Cheers, Stuart -- Stuart Rackham _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails