I'm struggling with updating a nav bar that has different divs based on the link clicked.
<script>
$(document).ready(function (){
$("#content").load("content/index_content.php");
$('a').click(function(){
$('#content').load($(this).attr('href'));
$('#nav_' + 'a' + "active");
return false;
});
});
</script>
<span id="nav">
<a href="content/index_content.php"><div id="nav_home_active></div></a><a href="content/news_content.php"><div id="nav_news">
</div></a>
<a href="content/staff_content.php"><div id="nav_staff"></div></a>
<a href="stats.php"><div id="nav_stats"></div></a>
<a href="content/contact_content.php"><div id="nav_contact"></div>
</a>
</span>
I'm having trouble concatenating the word "active" to reflect the current page and change the button on line 7 of the jquery block. Any suggestions on how to achieve this?
Appreciate any help, thank you!