# Effect.Fade and Back Button

**URL:** <https://www.ruby-forum.com/t/effect-fade-and-back-button/135310>\
**Category:** Ruby\
**Created:** [April 21, 2008, 1:08am UTC](https://www.ruby-forum.com/t/effect-fade-and-back-button/135310 "2008-04-21T01:08:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![judith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/d9b06d/32.png) [@judith](https://www.ruby-forum.com/u/judith)\
**Post date:** [April 21, 2008, 1:08am UTC](https://www.ruby-forum.com/t/effect-fade-and-back-button/135310/1 "2008-04-21T01:08:13Z")

</div>

Hi,

i have a picture which dissapeares via Effect.Fade, but i’d like it to  
be seen when you leave the site and come back.  
but this doesn’t work out when the back button is used, as the site is  
not reloaded then and the div with the picture is still set on not  
visible/opacity=0

is there any possibility or solution?

thanks,  
judith

---

<div class="post-metadata">

**Author:** ![judith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/d9b06d/32.png) [@judith](https://www.ruby-forum.com/u/judith)\
**Post date:** [April 21, 2008, 2:54am UTC](https://www.ruby-forum.com/t/effect-fade-and-back-button/135310/2 "2008-04-21T02:54:11Z")

</div>

On Mon, Apr 21, 2008 at 9:08 AM, ju dith [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> i have a picture which dissapeares via Effect.Fade, but i’d like it to  
> be seen when you leave the site and come back.  
> but this doesn’t work out when the back button is used, as the site is  
> not reloaded then and the div with the picture is still set on not  
> visible/opacity=0  
> is there any possibility or solution?

You want AJAX history.

Basically you set some javascript to fire when the person comes back  
to the page.

Check out  
[http://lindsaar.net/2008/2/22/history-buttons-with-ajax-and-ruby-on-rails](http://lindsaar.net/2008/2/22/history-buttons-with-ajax-and-ruby-on-rails)  
for how to do it.

Mikel

---

<div class="post-metadata">

**Author:** ![judith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/d9b06d/32.png) [@judith](https://www.ruby-forum.com/u/judith)\
**Post date:** [April 21, 2008, 2:55am UTC](https://www.ruby-forum.com/t/effect-fade-and-back-button/135310/3 "2008-04-21T02:55:56Z")

</div>

ju dith wrote:

> Hi,
> 
> i have a picture which dissapeares via Effect.Fade, but i’d like it to

Judith, this sure looks like a question about Ruby on Rails, but this is  
the Ruby mailing list. You’re going to have better luck getting an  
answer on the Ruby on Rails mailing list. See  
[Ruby on Rails — Community](http://www.rubyonrails.com/community).
