AtsoK wrote: > I just style a #notice div with CSS, and then in my application layout > file, right above yield, I have: > > <%= "<div id='notice'>#{flash[:notice]}</div>" if flash[:notice] %> > > And then to make it fade out after 5 seconds: > > <% if flash[:notice] %> > <script type="text/javascript"> > new Effect.Fade('notice', { delay: 5 }); > </script> > <% end %>
Really cool trick. It's exactly what I was looking for. Do you have any idea how to combine visual_effects? The doc for scriptaculous is broken at github, it misses the demo page. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---