By “active” I mean to have the link pointing to the current page classed as “active.” This way the link’s appearance can be modified using css.
Is it possible to implement an active link navigation without using a server side language? I would like to only use CSS/HTML/jQuery if possible. If there are, what are those methods? Assuming you want to create the following structure:
<ul id="nav">
<li class="active">Home</li>
<li>About</li>
<li>Contact</li>
</ul>
You have 2 choices.
e.g. if you were using jQuery, you could do:
If at all possible though, I’d opt for #1… doing this server-side when you “build” the menu structure as this will be easier to maintain in the long run.