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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:09:03+00:00 2026-05-22T03:09:03+00:00

I have a test setup where the thumbnail div fades into another div, there’s

  • 0

I have a test setup where the thumbnail div fades into another div, there’s a couple of problems with it though.

  1. How can I remove the white pause? At the moment it fades one div out to white then fades in the second div. How can I make it fade from one div to the other without it fading to white?
  2. It’s a little unstable, if you hover over quickly and out the second div appears below the original. How can I make it a bit more stable?
  3. I’m going have multiple thumbnails with different images and text in each one, how can I setup the grid to include multiple boxes without them all fading in/out at once (i.e separately).

Here’s the code:

Javacript:

<script type="text/javascript"> 

$(document).ready(function(){
            $(".phase-2").hide();
        });


$(function(){
$('.grid-box').hover(
        function(){
            $('.grid-box .phase-1').fadeOut(300, function(){
                $('.grid-box .phase-2').fadeIn(300);                         
            });
        },
        function(){
            $('.grid-box .phase-2').fadeOut(300, function(){
                $('.grid-box .phase-1').fadeIn(300);                         
            });
        }
        ); 
});
</script>

HTML:

<div class="grid-box">
<div class="phase-1">
       <img class="grid-image" src="http://teamworksdesign.com/v2/wp-content/themes/default/images/dtr.jpg" alt="" height="152" width="210" />
   <div class="grid-heading">
        <h2>DTR Medical</h2>
        <h3>Branding, Web, Print</h3>
    </div> 
</div>
<div class="phase-2">
    <div class="grid-info">
        <h4>Probeything 2000</h4>
        <p>Marketing unglamorous single-use medical intruments is not simple. We helped Neurosign increasetheir sales by 25% and increasemarket awareness.</p>
    </div>
    <div class="grid-heading-hover">
        <h2>DTR Medical</h2>
        <h3>Branding, Web, Print</h3>
    </div> 
</div>

  • 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-22T03:09:04+00:00Added an answer on May 22, 2026 at 3:09 am

    1) Rather than do the fadeIn of the hover item on the callback, do it immediately. This will prevent the white background showing through:

    $('.grid-box .phase-1').fadeOut(300);
    $('.grid-box .phase-2').fadeIn(300);
    

    2) The easiest way to do this is to specify a size on the thumbnail container and the add overflow: hidden; to it.

    3) Finally the following code will make sure only the elements contained within the hovered-over div will be affected:

    $(function(){
        $('.grid-box').hover(
            function(){
                $('.phase-1', this).fadeOut(300);
                $('.phase-2', this).fadeIn(300);
            },
            function(){
                $('.phase-2', this).fadeOut(300)
                $('.phase-1', this).fadeIn(300);
            }
        ); 
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to have a good test setup but, I can't find a way
Ok, I have an Nunit test class setup that runs though a method, lets
I have this test case def setUp(self): self.user = User.objects.create(username=tauri, password='gaul') def test_loginin_student_control_panel(self): c
Suppose I have several small test cases. Easy enough to setup and easy enough
I have a ubr file setup to stress test an internal DotNetNuke site with
I have a checkstyle suppression filter setup (e.g. ignore magic numbers in unit test
I've created some MbUnit Test Fixtures that have SetUp methods marked with the SetUp
I have a test setup where I have many very similar unit tests that
I have e very specific test setup in mind. I would like to start
I have an test server setup that is running a version of the site

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.