Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7519135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:51:11+00:00 2026-05-30T01:51:11+00:00

I created this page: http://ikwebdesigner.com/special-characters/ When you click on the top navigation, it takes

  • 0

I created this page: http://ikwebdesigner.com/special-characters/

When you click on the top navigation, it takes you to a place within the same page. I need the nav link to stay highlighted until I click another link in the top navigation. I already know about CSS :focus. But the focus style will disappear when I click elsewhere.

I’ve searched this site and Google for the past few months and all I’m getting is current link highlighting for external pages. I already know how to do that using PHP. What I don’t know how to do is make active links that are on the same page stay highlighted once clicked.

I need something, possibly jQuery, that will add an .active class so I can style it. And the link should stay that color until I click another link within that same group.

I’ve seen this done on a few sites, I open the code and try to duplicate it, but it doesn’t work for me. I was wondering if there was someone you could help me with.

Bonus points if the highlighted/active link could change depending on the different section I was on would be an awesome plus as well. I’ve seen this too.

I use a lot of jQuery, so perhaps something in jQuery would be best. Thanks in advance. I, however, don’t know jquery or javascript. I don’t know how to write it. I usually just find someone’s code/tutorial that works. In this case I haven’t be able to find something like this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T01:51:12+00:00Added an answer on May 30, 2026 at 1:51 am

    I see you have one page and you use anchors to move through it. Now having a menu with highlighted active section is what you want if I am getting you right.

    You could do it in a variety of ways with jquery.

    one way would be to record the selected index in a hidden field, and change the value on each click. then check the value of the hidden field and apply styling to the menu item on every menu click or page load, however you handle that.

    the other option that comes to my mind is to check the URL path on every change. get the anchor ID from it and apply a style to the element with the id that corresponds to it.

    Hope this gives you an idea.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created this fan page http://www.facebook.com/pages/ohlala/327385737341 and added an application on tab "Special
I created this page http://www.facebook.com/pages/Comolakeboats/165976416773845?sk=app_266460616737435 with my iframe application correctly set up. Everything's going
I've created this test-page: http://uploads.dennismadsen.com/width.html <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html
I have created a custom drop-down element, which is listed on this page: http://jsfiddle.net/spryno724/2snUH/3/
I just followed the instructions from this page ( http://www.alexkorn.com/blog/2011/03/getting-php-mysql-running-amazon-ec2/ ) to setup apache
On this AutoFac Best Practices page ( http://code.google.com/p/autofac/wiki/BestPractices ), they say: Don't Pass the
i am trying to do a page like this - http://www.wickham43.supanet.com/tutorial/headerfooterfixexample.html but i want
On this page http://equals.lsri.nottingham.ac.uk/puzzle/create , if you type something into an input and then
I am mostly following this page: http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html I used this command to create the
It is possible to create a constant like this: http://haacked.com/archive/2007/09/16/conditional-compilation-constants-and-asp.net.aspx <%@ Page CompilerOptions=/d:QUUX %>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.