Solved

Cross Browser Page Fade-In on load and Fade-out on click to new page

Posted on 2010-08-26
5
1,188 Views
Last Modified: 2012-08-13
I need a page to load as solid black, and then fade to reveal the page content.

When a link to another page on the site is clicked, I need the current page to fade out to black. The new page should also load as solid black and fade to reveal the page content.

I have tried a few jQuery snippets, without success.

The solution must work with Firefox, Safari, and IE. Opera would be nice.

I'd appreciate your ideas.
0
Comment
Question by:birwin
  • 3
  • 2
5 Comments
 
LVL 40

Accepted Solution

by:
Richard Quadling earned 500 total points
ID: 33540942

document.observe
      (
      'dom:loaded',
      function()
            {
            document.body.show();
            
            document.observe
                  (
                  'unload',
                  function()
                        {
                        document.body.fade();
                        }
                  );
            }
      );

You will need to have ...



for this to work, otherwise no fade in.

0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 33540991
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 33541133
0
 
LVL 6

Author Comment

by:birwin
ID: 33561180
I would far prefer to use a jQuery function, but I haven't found one that will work on the full page.
I already have jQuery running on the page. I am using the Dynamic Drive Fade In Slideshow. (http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm) and any attempt that I have made to fade the page, either by trying to fade the body tag or a div wrapper, has not been successful. The image fades in, but the menu elements and other elements on the page don't fade, even when enclosed in a div.
 
 
0
 
LVL 6

Author Closing Comment

by:birwin
ID: 33818661
This particular page was loaded with other JavaScript and jQuery code, and was never able to get a page transition to work on it, but your code does work on a normal HTML page.

Thanks for the code.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

774 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question