Wednesday, 7 August 2013

JavaScript change page effect

JavaScript change page effect

Hi by any chance anyone will know how to do the fade in fade out change
page effect in JavaScript?
Like this.. http://soulwire.co.uk/hello
I have tried this..
But when fadeout is not linking together..I mean not smooth like the above
website.
$(document).ready(function() { $('body').css('display', 'none');
$('body').fadeIn(1000); $('.link').click(function() {
event.preventDefault(); newLocation = this.href; $('body').fadeOut(2000,
newpage); }); function newpage() { window.location = newLocation; } });

No comments:

Post a Comment