I have a common header for all of the pages I have in my site.
When I click on any link it takes me to that page and the page gets refreshed.
But the header is the same as it was in the previous page.
What I want is that when I click on any link, that link gets bold(Active) and if I am on homepage the home link should be active by default.
I am trying to work on this and when I click on any link the link gets active(bold) but as the page gets refresh and take me to the new page the link comes to non active(normal).
Here is my code.
<script type='text/javascript'>
$(window).load(function(){
$("#main-menu a").click(function() {
$('a').removeClass('active');
$(this).addClass("active");
});
});>
</script>
<style>
.active {font-weight:bold}
</style>
<!--Navigation-->
<nav id="main-menu">
<ul class="right">
<li><a href="#">Home</a></li>
<li><a href="#">Test Link 1</a></li>
<li><a href="#">Test Link 2</a></li>
<li><a href="#">Test Link 3</a></li>
</ul>
</nav>
Is there any way we can do it with the common header? Thanks,