Current style on one-page menu?

Hi

Does anyone know how i can put a current style to a link in my menu even tho its a one page design? otherwise i usually put a class=“current” to the correct links in the different files.

Anyone know how to this? I guess i have to use JS aswell?

You’ve lost me … if it’s only one page, why do you need a menu?

its one-page but with different sections, with anchors and a scrolleffect. Surerly u have seen onepage designs before?

[font=verdana]Ah, gotcha. Yes, in that case the easiest way would probably be to set an onClick on each of the links that would (a) clear the ‘current’ style from any other menu link, and (b) apply the ‘current’ style to that menu link.

If you’re not sure how to do that with Javascript then let me know and we can move this thread over to that part of the forum.[/font]

Okey, yeah would be nice if you could move the thread as i don’t know how to do that with Javascript=)

thx

Easiest way would be to use jQuery and a scrolling plugin (such as localScroll).

Here’s an easy to follow tutorial..

HTH

Thx very much will check it out=)

EDIT: Maby i was unclear in my topic. I do have the site and the scroll effect already, the thing i want to do is make the menu links display an active/current style different from the other links when on the correct part of the page. Like on this page for example http://wearemotto.com/ .

Oh, sorry.
That shouldn’t be too hard.
Can you post a link to your page?

Here ya go. You can do this with JS or jquery. Take your pic

JS http://www.websitecodetutorials.com/code/javascript/highlight-current-page-with-js.php

jQuery http://www.websitecodetutorials.com/code/jquery-plugins/jquery-add-and-remove-class.php