bcode Posted February 9, 2011 Share Posted February 9, 2011 Here is my Javascript that isn't working the way I would expect I am not very fluent with javascript. Wondering where I am going wrong with it you can see the problem on this page http://gen-fan.com/AA_blackreel/index.php it isn't loading back up after the click. What am I doing wrong am I using the functions incorrectly? $(document).ready(function(){ $("#response").css("display", "none"); $("#response").load("main.php"); $("#response").fadeIn(5000); $("#home").click(function(){ $("#response").fadeOut(5000); $("#response").delay(5000).load("main.php", function(){ $("#response").fadeIn(5000); }); }); $("#about").click(function(){ $("#response").fadeOut(5000); $("#response").delay(5000).load("about.php", function(){ $("#response").fadeIn(5000); }); }); $("#contact").click(function(){ $("#response").fadeOut(5000); $("#response").delay(5000).load("contact.php", function(){ $("#response").fadeIn(5000); }); }); }); Quote Link to comment https://forums.phpfreaks.com/topic/227200-fade-in-fade-out-and-delay-not-working/ Share on other sites More sharing options...
bcode Posted February 9, 2011 Author Share Posted February 9, 2011 Got it to work here is the js $(document).ready(function(){ $("#response").css("display", "none"); $("#response").load("main.php"); $("#response").fadeIn(5000); $("#home").click(function(){ $("#response").fadeOut(5000, function(){ $("#response").fadeIn(5000).load("main.php"); }); }); $("#about").click(function(){ $("#response").fadeOut(5000, function(){ $("#response").fadeIn(5000).load("about.php"); }); }); $("#contact").click(function(){ $("#response").fadeOut(5000, function(){ $("#response").fadeIn(5000).load("contact.php"); }); }); }); Quote Link to comment https://forums.phpfreaks.com/topic/227200-fade-in-fade-out-and-delay-not-working/#findComment-1172041 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.