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

  • Home
  • SEARCH
  • 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 6240101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:30:21+00:00 2026-05-24T11:30:21+00:00

I have CSS for list tags that emulate buttons, as follows: Before addClass is

  • 0

I have CSS for list tags that emulate buttons, as follows:

Before addClass is called (and ideally, what removeClass should return to)

#content_navigation li {
background-color:#C7C7C7;
border:2px outset black;
text-align:center;
font-weight:400;
}

After addClass(‘clicked’); is called

#content_navigation li.clicked {
background-color:#EFEFEF;
border:1px inset black;
font-weight:700;
}

My JQuery code (for one button):

$('#pass_settings_btn').click(function() {
$('#pass_settings_btn').addClass('clicked');
$('li:not(#pass_settings_btn').removeClass('clicked');

In Firefox, this works perfectly. but in Opera/IE7 (the only ones I have to test on, apart from Firefox 5), but buttons don’t go back to their original states. The original CSS isn’t “coming through” after removeClass is called. How can I fix this (hopefully without a browser specific hack?)

  • 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-24T11:30:22+00:00Added an answer on May 24, 2026 at 11:30 am

    Try changing

    $('li:not(#pass_settings_btn').removeClass('clicked');

    to

    $('li:not(#pass_settings_btn)').removeClass('clicked');

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

Sidebar

Related Questions

Say I have a list as follows: item1 item2 item3 Is there a CSS
I have css that works on all tr tags for the table. so in
I have a page that there is a list of tags, just like here
I have some list items with anchor tags, that are set to display block
I have the following CSS .ul{ list-style-image:url(/images/bullet.png) } My bullet.png is 20 x 20px
I have a CSS like this ul { list-style-image:url(images/bulletArrow.gif); } ul li { background:
It is advisable to use tables in HTML pages (now that we have CSS)?
I have a CSS class called grid which I place on my tables. I
I have some CSS that doesn't behave correctly with IE8. It works fine with
Using jquery I have a clicking tab mechanism that are nothing but anchor tags

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.