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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:54:32+00:00 2026-05-23T07:54:32+00:00

I have the following rules: .foo { /* default foo style */ } .foo:hover

  • 0

I have the following rules:

.foo { /* default foo style */ }
.foo:hover { /* hover style */ }
.fooactive { /* extra styles when active */ }

On my anchor I’m calling like this:

onclick="showDetails(123,this)"

Finally on the js function I have, among other things:

function showDetails(eid, element){
  $('.foo').removeClass('fooactive'); 
  $(element).addClass('fooactive'); 
}

When I click, I should have an effect, but I don’t immediately see the effect because, I also have a CSS :hover rule and, I end up seeing that effect, ONLY when I roll out that element area.

How can we disable the hover, effect once we click, so that this weird effect doesn’t occur? Is there some other way ?

  • 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-23T07:54:33+00:00Added an answer on May 23, 2026 at 7:54 am

    Update your CSS rule for .fooactive to look like this:

    .fooactive, .fooactive:hover { /* extra styles when active */ }

    This will override the hover effect you see for the base foo class.

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

Sidebar

Related Questions

I have factory that looks something like the following snippet. Foo is a wrapper
I have a password validation like the following rules Should contains at most 15
Assume I have the following rules: unify('test', 'this is a test'). run :- write('Enter
I have a rewrite rule of the following form: RewriteRule ^foo/([a-zA-Z0-9]+)$ foo.php?arg=$1 [qsa,nc] It
I have the following code to enable validation work: $(document).ready(function() { $(#eventForm).validate({ rules: {
I have the following method and interface: public object ProcessRules(List<IRule> rules) { foreach(IRule rule
I have defined a fieldset in HTML, and applied the following (simple) CSS rules
I have the following htaccess rule I'd like to apply for every IP address
I have the following Makefile rules: DIR = src SOURCES = $(shell find $(DIR)
Say I have a Boost Spirit grammar like this, where a parent rule passes

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.