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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:11:44+00:00 2026-06-19T02:11:44+00:00

I would like to fade image without white transfer between them. HTML: <div class=image>

  • 0

I would like to fade image without white transfer between them.

HTML:

<div class="image">
  <span><img src="1.jpg"></span>
</div>

jQuery:

$('.image > span > img').fadeOut(1000, function() {
  $('.image > span > img').attr('src', images[i]);
  $(this).fadeIn(1000);
});

This works, but there is white fade between changing. Images array contains image sources.
I found this http://jsfiddle.net/byB6L/ but I can not update my code to work with that.

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

    This is because your using the same image on the animation end callback.

    My suggestion: use position: relative; on the class="image" container, put the image element as position:absolute;, now after you are fading the image out insert a new image into the container and fade it in and remove the first image.

    Example:

    Html:

    <div class="image">
      <span><img src="1.jpg"></span>
    </div>
    

    Css:

    <style type="text/css">
        .image{position:relative;}
        .image span img{position:absolute;top:0;left:0;}
    </style>
    

    JavaScript:

    <script type="text/javascript">
        $('.image > span > img').fadeOut(1000);
        var $image = $('<img alt="" src="YOUR NEW IMAGE_PATH" style="opacity:0;" />');
        $('.image > span').append($image);
        $image.fadeIn(1000, function(){
            $('.image > span > img').first().remove();
        });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this function. $('.anythingSlider').delegate('img','click', function(){ $('#largeImage').attr('src',$(this).attr('data-image')); }); I would like to have the
I have a fixed-position image that I would like to fade out when scrolling
I would like to fade one (button) image to another. There are 2 fixed
I have one image button and I would like to fade out one image
I have a background image for a link that I would like to fade
I would like to change the colour/image that the Ultimate Fade-in Slideshow fades in
Once the page has finished loading, I would like one image to cross-fade to
I have two images. I would like for the second image to fade-in when
I have a splash screen that I would like to fade in, while my
I would like the top_content function to cross fade with #test and #test1. Right

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.