Just to jump in, You might get better animation quality/performance from a full screen fade if you fade _in_ a solid div occupying 100% of the viewport, rather than fading out the body tag. If the overlay div is the same color as your background, the effect will be near identical.
the window.location will wait until the fade is done, being placed as a callback param to the animation. Regards, Peter Higgins Sid wrote: > Hamish, > > Does the window.location wait for the fade animation to complete? I > currently use a setTimeout to load data into a div container after the > fade in animation has completed, else while the div is fading in, the > loaded data shows through. > > > > On May 20, 9:26 am, Hamish Campbell <[EMAIL PROTECTED]> wrote: > >> You have to intercept clicks on links, store the href while the page >> fades then redirect to that address: >> >> $(document).ready(function(){ >> $('a').click(function() { >> var target = $(this).attr('href'); >> $('body').fadeOut('slow', function() { >> window.location = target; >> }); >> return false >> }); >> >> }); >> >> Tested IE7, seems to work fine :) >> >> On May 20, 11:57 am, Anabelle <[EMAIL PROTECTED]> wrote: >> >> >> >> >>> I need to add a simple effect to my website but I've been searching >>> all afternoon with no luck, hope someone can help me. >>> >>> I need to add a Fade out effect to the entire page whe the user clicks >>> a link leaving the current page. >>> >>> How can I do it?- Hide quoted text - >>> >> - Show quoted text - >>