I have the following script for a smooth fadeIn, fadeOut when I'm linking to subpages.
$("body").css("display", "none");
$("body").fadeIn(500);
$('a').click(function(event){
event.preventDefault();
linkLocation = this.href;
$("body").fadeOut(500, redirectPage);
});
function redirectPage() {
window.location = linkLocation;
}
which works fine. The weird thing about this is, that the browsers back button has an issue. Lets say I'm on my index.html
and click on a link which links to about.html
, and try to get back to index.html
by the back button all it shows is a blank page. It needs to refresh manually.
To make my issue clearer you can find an example HERE
NOTE: I experience this issue under Firefox and Safari. Chrome seems to be fine.