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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:50:32+00:00 2026-06-12T11:50:32+00:00

Edit : Before this edit, I was asking for solutions involving CSS. I was

  • 0

Edit: Before this edit, I was asking for solutions involving CSS. I was notified that I would need Javascript to complete the following tasks

Description: I have a class (profile-inner) that displays a member’s complete profile. It’s background color is white. I have gotten a hover to work for profile-inner. It’s background color is gray. There is the link “Comment” in class “profile-footer”. When it is clicked, it toggles the class “inline-profile-comment” (expand/collapse).

Problem: The “profile-inner” hover selects the whole container including toggled class “inline-profile-comment”. I do not want this. I only want the hover when “inline-profile-comment” is not shown.

Html:

<div class="profile-inner">
  an entire profile

    <div class="profile-footer">
      <a data-toggle="collapse" data-target="#<%= profile_item.id %>_comment">
       Comment</a> 
       <ul><li>lots of list items etc</li></ul>

       <div class="inline-profile-comment">
      <div id="<%= profile_item.id %>_comment" class="show collapse">
     The comment form
   </div></div>

 </div></div>

CSS:

.profile-inner {
  background-color: rgb(255, 255, 255);
}

.profile-inner:hover {
  background-color: rgb(243, 243, 243);
  cursor: pointer;
}

I hope I have explained it good enough. Thanks for your help.

  • 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-12T11:50:33+00:00Added an answer on June 12, 2026 at 11:50 am

    I think you can do this if you add/remove a class after the toggle happened and change the css selector for hover to that class, like

    JS

    $('.profile-inner').toggleClass('hover');
    $('.profile-footer a').on('click', function(e){
        e.preventDefault();
        $('.inline-profile-comment').toggle('fast',function(){
            $('.profile-inner').toggleClass('hover');
        });
    });
    

    CSS

    profile-inner {
        background-color: rgb(255, 255, 255);
    }
    .profile-inner.hover:hover {
        background-color: rgb(243, 243, 243);
        cursor: pointer;
    }
    .inline-profile-comment{ display:none; }
    

    Working Example.

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

Sidebar

Related Questions

Before answering this question, understand that I am not asking how to create my
EDIT : see bottom First off I searched for an answer before asking this
I create an audio buffer and want to edit this before I play this
I need edit my Images before they import to the app but after editing
Do I need to call edit SharedPreferences everytime before I change the preferences and
I've been searching the web (and S.O.) for a while before asking this question.
( again annoying question... ) after asking this before - ( which is partly
I know that this question has been asked previously, but before you give me
I've been searching around before asking this. I have Django template, which inputs a
So, I have this code in a controller: before_filter :require_login, :only => :new, :edit,

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.