Button highlight depending on what section you are in

Discussion in 'JavaScript' started by minesapint88, Oct 22, 2008.

  1. #1
    Hello Guys, I'm a total noob with Javascript so sorry if i sound dumb :)

    Is there any way in java script or html to be able to do this:

    Depending on what section of the website you are in, a button / image will change to highlight what section you are in?

    I have a really long website and need to highlight what section you are in. I'm using <div>'s to place images and css.

    Cheers
    Dave
     
    minesapint88, Oct 22, 2008 IP
  2. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #2
    er, yeah, but you'd typically not do that via js... but define a class in css and set that to be the selected class via php on page rendering.

    not that you can't do it via js, just that it's not practical - unless you run a tabs based interface with hidden layers.
     
    dimitar christoff, Oct 22, 2008 IP