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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:58:47+00:00 2026-06-15T17:58:47+00:00

currently revising my code for my menu bar just want to ask on how

  • 0

currently revising my code for my menu bar just want to ask on how to change the class of my hr tag wherein whenever I click a link the line below the link will change. Well I’m doing it for my horizontal menu. I’ve made the some code but I admit I’m not so sure of what I’m doing. Well here’s my code so far:

HTML

 <div class="menu">
    <table class="menu_item">
        <tr>
            <td>
                <a href="#">Events</a>
                <hr class="active" />
            </td>
            <td>
                <a href="#">Reports</a>
                <hr />
            </td>
            <td>
                <a href="#">Settings</a>
                <hr />
            </td>
            <td>
                <a href="#">Logout</a>
                <hr />
            </td>
        </tr>
    </table>
</div>

<script type="text/javascript" src="<?php echo $base; ?>javascripts/anim.js"></script>

CSS

    .menu{
    margin-top:20px;
    margin-bottom:10px;
}

.menu_item td{
    text-align:center;
    width:25%;
}

.menu_list{
    width:1000px;
    margin-left:auto;
    margin-right:auto;
}

.active{
    background-color:#330000;
}

a {
    color:#ffffff;
    text-decoration:none;
    outline:0;
    border:0;
}

hr.active{
    color:#ffff00;
}

and the Jquery

$("a").click(function() {
  $("hr").click(function (){
      $("hr").removeClass("active");
      $(this).addClass("active");
  });
});

Well I basically just want it to appear like the tabs on android ICS a little bit. Just a little bit though.

  • 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-15T17:58:49+00:00Added an answer on June 15, 2026 at 5:58 pm

    I’m not sure what Google ICS looks like, but I think this does what you’re asking.

    $("a").click(function() {
          $("hr").removeClass("active");
          $(this).next().addClass("active");
    });​
    

    Demo here. I changed the CSS a bit.

    In your code, the $("hr").click is unnecessary. The user does not click on the hr tag, only the a tag. Also, you were adding the active class to the a tag, not the hr.

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

Sidebar

Related Questions

Currently am creating files using the below code,I want to create a directory based
I'm am currently revising a plugin architecture so that it utilizes AppDomains. The main
Currently I have this code: <?php echo '<meta name=robots content=noindex>'; $arr = json_decode(file_get_contents(http://media1.clubpenguin.com/play/en/web_service/game_configs/ paper_items.json),true);
currently i have <div class=rightBoxesTop> <h3>My Pages</h3> <h3 style=line-height: 8px; width: 80px; font-size: 80%;
Currently I have made a flash/as3 Snake game which I want to somehow make
Currently I have a select tag with various options for the State in a
Currently my website (production server) already have a lot of code in it. And
I am revising some very old (10 years) C code. The code compiles on
Currently to me, LINQ is just a loose and amorphous cloud of concepts, usually
Currently I am writing a program for an introductory Java class. I have two

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.