getting the "current" class for an a tag

  • # October 28, 2008 at 4:36 pm

    Silly question probably… I don’t know how this is done… Lets say for tabs, you select a tab, and it keeps the link the new color since it now has the class of "current".

    Chris uses this in his side scrolling coda-like side bar for the above images. Each time you click on a tab, the selected tab is now displayed. I looked into the CSS and I can understand its adding the current class to the link, I’m not just sure how that is happening.


    # October 29, 2008 at 3:42 am

    You can use php to read the urlbar and check if the page you are on is on is the same as the one in the menu. Its kinda hard to explain how to do it, but if you google for php get you get some examples.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.