Hello i've been trying to change the content of a div using jquery and i have the following problem, this is my code:
<div id="pages">
<div id='cssmenu'>
<ul id="themenu">
<li class='active'><a href='#'><span>Home</span></a></li>
<li class=''><a href='#'><span>Modules</span></a></li>
<li class=''><a href='#'><span>Degrees</span></a></li>
<li class=''><a href='#'><span>About us</span></a></li>
</ul>
In the js.js :
var Modules = "<p> 12346 </p>";
var Degrees = "<p> degrees </p>";
$(document).ready(function() {
$('ul#themenu li').click(function() {
$('li.active').removeClass('active');
$(this).addClass('active');
**$('#content').html(Modules);**
});
What I am trying to do is have the content changes accordingly with the variable that matches the ul's list items span name, if you can think of a better way to do this please let me know, thank you in advance, Chris.