/ Published in: jQuery
Originally from OneExtraPixel
Making page transitions
Making page transitions
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// http://www.onextrapixel.com/2010/02/23/how-to-use-jquery-to-make-slick-page-transitions/ $("body").css("display", "none"); $("body").fadeIn(1500); $("a.transition").click(function(event){ event.preventDefault(); linkLocation = this.href; $("body").fadeOut(500, redirectPage); }); function redirectPage() { window.location = linkLocation; }