Does anyone know of a jquery plug-in that highlights navigation upon clicking an anchor link (with smooth scroll would be perfect)?

Here's two examples that do exactly what Im looking for:
http://www.brizk.com
http://www.crushlovely.com

If there's not a jquery plug-in and you can point me in the direction of some javascript that has a good explanation of how to implement, I would really appreciate it as I am mainly a CSS/HTML guy.

Thanks.

1 answer

Mottie 1134
1
point
This was chosen as the best answer

I answered this (almost) exact same question on StackOverflow... here is the demo. You shouldn't have to change it much, but if you need help just hollar at me :)

Answered over 6 years ago by Mottie
  • For some reason I can't get it to work on the site I'm working on. I downloaded the code, put the javascript into my page, commented out my original sidebar nav and replaced it with your sidebar css...then renamed my sidebar to match your example, but it didn't work. I even tried removing my reset.css and styles.css to see if there was some sort of css conflict, but that didn't work either. I put it back to the way it should look, with your javascript code in the page to try and keep it as close to final as possible. I've uploaded a test page to: http://www.reynoldsadvertising.com/test/portfoliotest.html Can you take a look and tell me what's going wrong? Thanks so much, I really really appreciate it... Erick Pfleiderer over 6 years ago
  • By the way, I wanted to say thanks again for answering this for me. I've been trying to get this working for about a week now with no luck. As a designer, if there's anything I can do to return the favor, please let me know. Cheers. Erick Pfleiderer over 6 years ago
  • Hi Erick! It appears the problem is the script breaks if the link doesn't exist. So if you add the additional menu links it should start working. I'm actually in the process of making this script into a plugin - if you are interested, I'll post it sometime today or tomorrow on my site wowmotty.blogspot.com Mottie over 6 years ago
  • I added the others, but no luck. I'll try and setup a jQuery version from your website and see how that goes. Will post back here shortly with how that works out. Erick Pfleiderer over 6 years ago
  • Got it to work with just the javascript...had a typo in one of the ID names lol....ugh. What a week. Thanks so much! If ya ever need any design help, shoot me an email. erick@pfly.com Erick Pfleiderer over 6 years ago