The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Fade Out between pages Re: Fade Out between pages


I know this is an old thread but I couldnt help notice the code that was posted… Everything soap posted will work perfectly fine for what youre trying to do, he just forgot to pass the event object.

The code below should get you the effect you were looking for:

$(document).ready(function() {
$('body').css('display', 'none');

$('.link').click(function(event) {
newLocation = this.href;
$('body').fadeOut(1000, newpage);

function newpage() {
window.location = newLocation;

If you notice, the only difference in the code above and what soap posted was on the line with

$('.link').click(function() {

it should have read

$('.link').click(function(event) {

Hopefully this helps someone out in the future :)