Hello,
I am working on a one page website that allows the users to add and remove pages from there navigation as and when they would like too, the way it works is that if the click 'Blog' on the main nav a 'Blog' section should appear on the page, if they then click 'News' the 'News' section should also be visible, however the way I have started to implement this it seems I can only have one section at a time, can my code be adpated to allow multiple sections to shown on the main page.
Here is my code for the page that has the main menu and the users selections on it.
<!DOCTYPE html>
<head>
<title>Development Site</title>
<link rel="stylesheet" href="/media/css/reset.css" media="screen"/>
<link rel="stylesheet" href="/media/css/generic.css" media="screen"/>
<script type="text/javascript" src="/media/javascript/jquery-ui/js/jquery.js"></script>
<script type="text/javascript" src="/media/javascript/jquery-ui/development-bundle/ui/ui.core.js"></script>
<script type="text/javascript" src="/media/javascript/jquery-ui/development-bundle/ui/ui.accordion.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('a.menuitem').click(function() {
var link = $(this), url = link.attr("href");
$("#content_pane").load(url);
return false; // prevent default link-behavior
});
});
</script>
</head>
<body>
<li><a class="menuitem" href="inspiration">Inspiration</a></li>
<li><a class="menuitem" href="blog">Blog</a></li>
<div id="content_pane">
</div>
</body>
</html>