# Fading

**URL:** <https://www.ruby-forum.com/t/fading/179996>\
**Category:** Rails\
**Created:** [December 9, 2009, 1:57pm UTC](https://www.ruby-forum.com/t/fading/179996 "2009-12-09T13:57:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mercurius](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Post date:** [December 9, 2009, 1:57pm UTC](https://www.ruby-forum.com/t/fading/179996/1 "2009-12-09T13:57:59Z")

</div>

I have an error message that is outputted as so:

\<%= flash[:notice] %\>

flash[:notice] is defined in my web\_controller. I want a fading effect  
on this text to draw more attention to it. Is there a simple way to do  
this that I can’t seem to find on Google?

I appreciate your patience.

---

<div class="post-metadata">

**Author:** ![mercurius](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Post date:** [December 9, 2009, 4:48pm UTC](https://www.ruby-forum.com/t/fading/179996/2 "2009-12-09T16:48:49Z")

</div>

You’ll have to use a javascript library. By default, rails includes the  
prototype.js library. Use the ajax helper methods to achieve the effect  
you desire.

You could also use jQuery.

Cheers,

Punit

Pale H. wrote:

> I have an error message that is outputted as so:
> 
> \<%= flash[:notice] %\>
> 
> flash[:notice] is defined in my web\_controller. I want a fading effect  
> on this text to draw more attention to it. Is there a simple way to do  
> this that I can’t seem to find on Google?
> 
> I appreciate your patience.

---

<div class="post-metadata">

**Author:** ![mercurius](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Post date:** [December 9, 2009, 4:54pm UTC](https://www.ruby-forum.com/t/fading/179996/3 "2009-12-09T16:54:10Z")

</div>

Punit Rathore wrote:

> You’ll have to use a javascript library. By default, rails includes the  
> prototype.js library. Use the ajax helper methods to achieve the effect  
> you desire.
> 
> You could also use jQuery.
> 
> Cheers,
> 
> Punit
> 
> Pale H. wrote:
> 
> > I have an error message that is outputted as so:
> > 
> > \<%= flash[:notice] %\>
> > 
> > flash[:notice] is defined in my web\_controller. I want a fading effect  
> > on this text to draw more attention to it. Is there a simple way to do  
> > this that I can’t seem to find on Google?
> > 
> > I appreciate your patience.

Yeah, I’ve had a look at prototype already. I just wanted another option  
really. Thanks - I’ll look into jQuery.

---

<div class="post-metadata">

**Author:** ![mercurius](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Post date:** [December 9, 2009, 5:27pm UTC](https://www.ruby-forum.com/t/fading/179996/4 "2009-12-09T17:27:08Z")

</div>

Punit Rathore wrote:

> You’ll have to use a javascript library. By default, rails includes the  
> prototype.js library. Use the ajax helper methods to achieve the effect  
> you desire.

Nope. This has nothing to do with Ajax – it’s just a JS visual effect.  
You can do it with [scrip.aculo.us/Prototype](http://scrip.aculo.us/Prototype), or with jQuery, or with any  
other JS library.

> You could also use jQuery.
> 
> Cheers,
> 
> Punit
> 
> Pale H. wrote:
> 
> > I have an error message that is outputted as so:
> > 
> > \<%= flash[:notice] %\>
> > 
> > flash[:notice] is defined in my web\_controller. I want a fading effect  
> > on this text to draw more attention to it. Is there a simple way to do  
> > this that I can’t seem to find on Google?
> > 
> > I appreciate your patience.

Best,  
–Â  
MarnenÂ Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
