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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:11:53+00:00 2026-06-08T07:11:53+00:00

I have 4 navigation buttons and i am designing a single page vertical site..

  • 0

I have 4 navigation buttons and i am designing a single page vertical site..

When user clicks button 1, i wish to highlight it by applying CSS which is pretty simple.. But then if user clicks button3 then how do i apply same CSS to that button(highlight) and remove the CSS which i had applied to button1(unhighlight)

  • 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-06-08T07:11:54+00:00Added an answer on June 8, 2026 at 7:11 am

    For example you have this for html part:

    <ul id="nav_bar">
        <li id="item1">Item 1</li>
        <li id="item2">Item 2</li>
        <li id="item3">Item 3</li>
        <li id="item4">Item 4</li>
    </ul>
    

    And you have this for css:

    #nav_bar li {
        // some style here
    }
    
    .nav_item_clicked {
        // something else here
    }
    

    And the jQuery part:

    $("#nav_bar li").click(function() {
        $("#nav_bar li").removeClass("nav_item_clicked");
        $(this).addClass("nav_item_clicked");
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a navigation bar that tells the user which page is selected by
I have some buttons on a view for navigation and when a user presses
I have 2 navigation buttons, 'a' and 'b', where 'a' links to page 'A'
I'm trying to have navigation buttons on my page load content files, but a
I have some page navigation buttons + a dropdown box that I'm trying to
I want to have a navigation bar with a settings button on it that
I have a list of items with a plus button in the navigation bar
I have a menu set up this way: <div id='top-navigation'> <ul> <li><a class='top-nav-button-unclicked' href='#'>SUBJECT</a></li>
I have a navigation on a site which uses subnavigation in the main navigation...
I have a navigation bar with three buttons on the right (arrows for navigation

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.