How to change the css class="current" when using page jumping (single page website)?

Posted by Bryan on Stack Overflow See other posts from Stack Overflow or by Bryan
Published on 2012-04-08T17:26:11Z Indexed on 2012/04/08 17:29 UTC
Read the original article Hit count: 263

Filed under:
|
|

Morning,

I must be asking google all the wrong questions, because I can't find anything similar.

I have a standard navigation list, but I'm using page jumping because I wanted a single web page.

<ul>
<li><a href="#livestream">Livestream</a></li>
<li><a href="#media">Media</a></li>
<li><a href="#crew">Crew</a></li>
<li><a href="#services">Services</a></li>
<li><a href="#contact">Contact</a></li>
</ul>

But I can't for the life of me figure out how to make the class="current" when using page jumping. I've tried this bit of jquery because it appears to be what I'm looking for, but it did nothing. I don't think it'll work for #links.

Any ideas?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery