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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:30:40+00:00 2026-06-05T13:30:40+00:00

There have been multiple questions regarding this topic but I have never really settled

  • 0

There have been multiple questions regarding this topic but I have never really settled on a solid answer. I have also tried various different ways and never found really the best solution.

In my situation, I have a bunch of flags I need to place in the header of my page. Each flag is a PNG, and I have also rendered out black and white versions of them. I want to add a simple CSS class to (either a DIV or an IMG, or something!) and have a small peice of jquery that will fade to the color image when I hover over it, and fade out when I am not hovering over it.

I dont want to do it with CSS because thats boring. Jquery is the way forward I feel, and it will look alot more classy.

Please help, I want the smallest most efficient code possible, without layers upon layers of CSS or a huge .JS include file.

Thanks,

Richard

  • 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-05T13:30:42+00:00Added an answer on June 5, 2026 at 1:30 pm

    something like this maybe:

    <div class="flag" style="background-image:url(bw.png)"><img src="incolor.png" style="display:none;"></div>
    
    <script>
    $(document).ready(function() {
        $('.flag').hover(function() {
            $(this).find('img').stop().fadeIn('fast');
        }, function() {
            $(this).find('img').stop().fadeOut('fast');
        });
    });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There have been multiple discussions on this topic in the site but I am
There have been many debates about this topic already here, but none of them
So I know there have been multiple questions regarding Money and converting to and
Recently there have been a couple questions regarding static type constraints and inline: Use
There have been similar questions ( here and here ) but I want a
I know questions around javascript compression have been asked multiple times but I cannot
There have been similar posts, but none helped me solve my problem. I am
There have been several questions posted to SO about floating-point representation. For example, the
There have been several questions over the past few days about the proper use
I have been reading these forums for some time, but this is my first

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.