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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:10:31+00:00 2026-06-01T00:10:31+00:00

am having a menu with five elements all under div’s with same class. onclick

  • 0

am having a menu with five elements all under div’s with same class.
onclick of a selected menu ( div) i want to make the font-weight of selected to bold.
for that i used .classname a:active{font-weight:Bold}.

this will make menu -item bold on active,but only on click, but it gets again normal when mouse click event ends.

But i need to make the menu-item bold until the user clicks on another menu-item.

howz it possible.
menu structre.

<div class="coolmenu">
 <a>menu1</a>
</div> <div class="coolmenu">
 <a>menu2</a>
</div>
  • 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-01T00:10:32+00:00Added an answer on June 1, 2026 at 12:10 am

    On click first you have to set font-weight to normal for all menu elements and then set bold only for clicked one, something like this:

    $('.coolmenu a').click( function(){
     $('.coolmenu a').css('font-weight','normal');
     $(this).css('font-weight','bold');
    });
    

    Maybe it will better if you use addClass instead css, it will give you more flexibility.

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

Sidebar

Related Questions

Am having a menu like this <li> <a href=/home class=active>Home</a> </li> <li> <a href=/service>Services</a></li>
I want to create an admin controller - without having any menu items associated
I'm having difficulty setting up a simple menu that displays results on a div
Here is my question. I am having this simple menu. <div id=menu> <ul> <li>
I'm having trouble with cross-browser compatibility. I have a simple menu (with all JS
I'm having a bug with the menu I'm developing, it all goes well until
I'm having problems with adding active class to wordpress menu. (If is home highlight
Im having some menu objects, here link1 and link2 which I want to toggle
Having a popup menu attached to several components on a form (buttons, but also
In left menu bar i am having two links about and messages while clicking

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.