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 3785188
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:29:25+00:00 2026-05-19T11:29:25+00:00

New to SO! Please suggest a better way to phrase this question :) I

  • 0

New to SO! Please suggest a better way to phrase this question 🙂

I have a single page, vertical scrolling website with a fixed navigation bar located in the footer. I am using local.scroll and anchors to link the navigation to divs on the page.

I would like the user to be able to click on one link and have it change to a selected state. I’m just not sure how to style/code the links for a single page (instead of using class=”select” for each active link as in multiple page sites.)

This site has an example of what I’d like to accomplish:
http://www.kristaganelon.com/#portfolio-section

  • 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-19T11:29:25+00:00Added an answer on May 19, 2026 at 11:29 am

    The example you referenced is using Javascript (in the form of the popular library JQuery) to create the selected state on the navigation as well as scroll the page.

    JQuery

    This library is very popular for creating the kind of event handlers you are looking for, as it easily binds events using simple CSS selectors familiar to anyone who has styled a page with CSS. The conventions of IDs, classes and attributes are used to find elements and bind events or change their states.

    The JQuery site has plenty of helpful tutorials, but a simple click event looks something like this:

        $(document).ready(function(){
          $('.button').click(function(){
            alert('You clicked me!');
        });
    });
    

    You could utilize JQuery’s .addClass to make clicking the element give it certain visual state:

    $(document).ready(function(){
          $('.button').click(function(){
            $(this).addClass('clicked');
        });
    });
    

    I suggest you look over the libraries documentation and learn how to first include it on your page, and then look over some basic event binding, toggling (since you’ll need this to remove the active state), etc. Learning these things will help you create interactive elements much easier.

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

Sidebar

Related Questions

This statement doesnot work in Entity Framework context.sleep.Where(o=>o.clientDateTime.TimeOfDay>new TimeSpan(18,0,0)).ToList(); Please suggest me a workaround.
I am fairly new to MVC so please don't hesitate to suggest a better/cleaner/simpler
I am very new to Ruby so could you please suggest the best practice
I'm very new to C# so please have some extra patience. What I am
I'm new to this kabeja package so please can some one provide code example
I am a very new in Python so please forgive me the basic question.
I'm new to PHP so this question seems stupid, but suppose I'm assigning variable
I have asked this question in many sites and my question remain unanswered. Some
I am very new to apache and django, so execuse me if this question
I am new in .net developement please suggest me, How to Synchronise calendar with

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.