DeanWhitehouse Posted July 21, 2008 Share Posted July 21, 2008 I have this code to show a second nav bar when they click on certain links. A few problems i am having are: 1. Changing the link that shows the second nav so when you click it again it hides the second nav> 2.I tried adding a sliding effect so it slides from the right , but mine didnt do anything , anyone know how to it? 3.Is there anyway to make this code more effcient as i think it isn't very well coded. Any help apprciated , Thanks Blade <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Draco Pangaia</title> <link rel="stylesheet" href="style.css" media="screen"/> <script type="text/javascript"> function show(amount,title,Link,title1,Link1,title2,Link2) { var page = "/template.php"; if(amount == 1) { var nav = "<li><a href="+Link+">"+title+"</a>"; } if(amount == 2) { var nav = "<li><a href="+Link+">"+title+"</a></li><li><a href="+Link1+">"+title1+"</a></li>"; } if(amount == 3) { var nav = "<li><a href="+Link+">"+title+"</a></li><li><a href="+Link1+">"+title1+"</a></li><li><a href="+Link2+">"+title2+"</a></li>"; } document.getElementById("show").innerHTML=nav; document.getElementById("new").innerHTML="<br>"; } alert(on); function hide() { document.getElementById('show').innerHTML=""; document.getElementById("new").innerHTML=""; } </script> </head> <body> <div id="container"> <span id="title"> Draco Pangaia </span> <div id="navbar" align="left"> <ul><li>Home</li><li>Story</li><li id="screen" onClick="show(2,'In game screens','screen.php?ingame','Pre Rendered','screen.php?pre');Slide()">Screenshots</li></ul> </div> <span id="new"></span> <div id="navbar" align="left"><ul id="show"></ul></div> <div id="maincontent"> Welcome to the official game site for Draco Pangaia. </div> </div> </body> </html> Link to comment https://forums.phpfreaks.com/topic/115863-scroll-effect-and-hide/ Share on other sites More sharing options...
DeanWhitehouse Posted July 21, 2008 Author Share Posted July 21, 2008 BUMP. Soz really need help on this Link to comment https://forums.phpfreaks.com/topic/115863-scroll-effect-and-hide/#findComment-595917 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.