reggaeboss — 2013-04-05T06:10:05-04:00 — #1
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?
stevie_d — 2013-04-05T07:24:30-04:00 — #2
You've lost me ... if it's only one page, why do you need a menu?
reggaeboss — 2013-04-05T07:34:46-04:00 — #3
its one-page but with different sections, with anchors and a scrolleffect. Surerly u have seen onepage designs before?
stevie_d — 2013-04-05T07:41:50-04:00 — #4
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.
reggaeboss — 2013-04-05T07:49:29-04:00 — #5
pullo — 2013-04-05T08:17:27-04:00 — #6
Easiest way would be to use jQuery and a scrolling plugin (such as localScroll).
Here's an easy to follow tutorial..
reggaeboss — 2013-04-05T08:18:14-04:00 — #7
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/ .
pullo — 2013-04-05T08:33:32-04:00 — #8
That shouldn't be too hard.
Can you post a link to your page?
picnictutorials — 2013-04-05T14:38:53-04:00 — #9