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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:17:12+00:00 2026-06-13T02:17:12+00:00

I have 6 images. When they are rolled over the images change using css

  • 0

I have 6 images.
When they are rolled over the images change using css hover.
When the images are clicked the original image appears (again using css) but I want the rest of the images to dim when one is selected.
I’ve been looking into various JS option but just cant seem to get it to work. Does anyone have any suggestions?

  • 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-13T02:17:13+00:00Added an answer on June 13, 2026 at 2:17 am

    Another solution is adding a class to the selected image and the images parent.
    This makes it easier to maintain as the styling is all done in css.

    Quick example here:

    css

    .img{
        display:inline-block;
        height:40px;
        width:40px;
        border:1px solid black;
    }
    
    .clicked .img{
        opacity:0.3;
    }
    
    .clicked .img.selected{
        opacity:1;
        background:red;
    }
    

    js

    ​
    $('.img').on('click', function() {
        $('.img').removeClass('selected');
        $(this).addClass('selected');
        $('.container').addClass('clicked');
    })​
    

    html

    <div class="container">
        <div class="img">img</div>
        <div class="img">img</div>
        <div class="img">img</div>
        <div class="img">img</div>
        <div class="img">img</div>
        <div class="img">img</div>
    </div>​
    

    http://jsfiddle.net/renekoch/y6YCc/

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

Sidebar

Related Questions

I have a hover solution setup with CSS. However, the hover images don't respect
I have two images that need to be overlaid over one another, and they
I have two images they actually do not overlap but I also can't have
I'm trying to have images fade in with css3 once they're loaded. The problem
i have 10 images and i want to show they with numbers(1,2,3,4,5...). I am
I have about 1000 PNG images (tiles) of equal size (32px x 32px). They
I am working with images, they all have their sizes mentioned in their name
I have a small problem... There are hundreds of images in a folder. they
In my project, I have so many .png images. They are working properly in
I have image A and image B. They are located in the different places

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.