Help with making panel navigation, possibly with php?
Hi guys,
I am trying to use less javascript in my site and where I can jQuery instead. In an earlier version of my site, I used Adobe Spry tabbed panels navigation (The link takes you to a simple demo). However, that involves js and including the spry js library.
So I was wondering if there is anyway I could do this in PHP and if someone could help me start a simple version of it?
What it is in a navigation where each link is a tab and the Spry dynamically replaces the old content with the new content when a new tab is selected.
Here is some html I quickly wrote up so I could explain it better:
Code HTML4Strict:
<!DOCTYPE HTML>
<html lang="en"
<head>
<meta charset="UTF-8">
<title> Tabbed panel menu with php</title>
<style>
#navigationContainer{
background-color:#000;
width:100%;
height:16px;
}
ul#listContainer{
margin: auto 0px auto 0px;
color:#fff;
width:62%;
}
ul#listContainer li a{
background-color:#000;
color:#fff;
text-decoration:none;
width:25%;
}
ul#listContainer li a:hover{
text-decoration:underline;
}
ul#listContainer li a:active{
background-color:#ccc;
text-decoration:none;
}
.panel{
color:#fff;
font-size:12px;
}
#wrapper{
margin:auto 0px auto 0px;
width:62%;
height:100%;
}
#content{
background-color:#ccc;
width:90%;
height:48%;
}
</head>
<body>
<div id="navigationContainer">
<ul class="listContainer">
<li id="panel1" class="panel"><a href"#panel1">Panel 1</a></li>
<li id="panel1" class="panel"><a href"#panel2">Panel 2</a></li>
<li id="panel1" class="panel"><a href"#panel3">Panel 3</a></li>
<li id="panel1" class="panel"><a href"#panel4">Panel 4</a></li>
</ul>
</div>
<div id="wrapper">
<div id="content">
<div>
</div>
</body>
</html>
And then an include to a php file or the php in the head that writes content, lets just say text for now, in #content.
If #panel1 is clicked then "This is the content in panel 1" is written
is this possible and I hope someone can help me achieve this in PHP. Please let me know if you need any more explanation or if you have any questions, comments, or solutions :)
Thanks in Advance & Best Regards,
Team 1504