Created
January 13, 2014 21:36
-
-
Save stephenscaff/8408628 to your computer and use it in GitHub Desktop.
Simple fade in on body and fade out via nav or link class. I usually use a the css for the fades and stuff, but this should do it....
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
$("body").css("display", "none"); | |
$("body").fadeIn(500); | |
$("nav a, a.suave").click(function(event){ | |
event.preventDefault(); | |
linkLocation = this.href; | |
$("body").fadeOut(500, redirectPage); | |
}); | |
function redirectPage() { | |
window.location = linkLocation; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment