What I want to do is... if the user is on index.php then 'latest post's in the navbar turns red, if the user is on ideas.php then 'ideas' in the navbar turns orange, if the user is on facts.php then 'facts' in the navbar turns yellow.
When one of these navbar words changes the colour, the rest still are white.
<div id="navbar"> <ul> <li><a class = "latest_posts_nav" href="index.php">latest posts</a></li> <li>|</li> <li><a class = "ideas_nav" href="ideas.php">ideas</a></li> <li>|</li> <li><a class = "facts_nav" href="facts.php">facts</a></li> <li>|</li> <li><a class = "quotes_nav" href="quotes.php">quotes</a></li> <li>|</li> <li><a class = "articles_nav" href="articles.php">articles</a></li> <li>|</li> <li><a class = "images_nav" href="images.php">images</a></li> </ul> </div>
I presume it's javascript of some sort?