I have a bunch of HTML pages, that are seperate files but I want to have a simple fade in/out between each of them.
I have used the code of:
$("#content").css("display", "none");
$("#content").fadeIn(2000);
$("ul.menu li a").click(function(event){
event.preventDefault();
linkLocation = this.href;
$("#content").fadeOut(1000, redirectPage);
});
function redirectPage() {
window.location = linkLocation;
}
I have bound it to my main menu at this stage, and content is the div between my header and footer (which I dont want to apply the effect to)
But the problem with this, is that it flickers a little, plus it shows the content briefly before disppearing and then fading it in again.
Is there a better/easier solution for this?