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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:44:39+00:00 2026-05-18T07:44:39+00:00

Morning mr. Stackoverflow. Is it possible to .animate between 2 img ? Like, change

  • 0

Morning mr. Stackoverflow.

Is it possible to .animate between 2 img ? Like, change the img src & fade to the new img src?

Html

<img class="classimg" src="images/example.png" />

My pseudo jquery/javascript code:

On Click
    Animate .classimg height 50 width 100 opacity 1, 600
    Animate .classimg height 200 width 450, 400
    Animate .classimg change img src to url(images/example_with_green.png), 700

Thank you for your affort – and a good 1st dec!

  • 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-18T07:44:40+00:00Added an answer on May 18, 2026 at 7:44 am

    As Robert said what you can do is this:

    <script type="text/javascript">
    
            $(function () {
                // find the div.fade elements and hook the hover event
                $('div.fade').hover(function() {
                    // on hovering over find the element we want to fade *up*
                    var fade = $('> div', this);
    
                    // if the element is currently being animated (to fadeOut)...
                    if (fade.is(':animated')) {
                        // ...stop the current animation, and fade it to 1 from current position
                        fade.stop().fadeTo(1000, 1);
                    } else {
                        fade.fadeIn(1000);
                    }
                }, function () {
                    var fade = $('> div', this);
                    if (fade.is(':animated')) {
                        fade.stop().fadeTo(1000, 0);
                    } else {
                        fade.fadeOut(1000);
                    }
                });
            });
    
        </script>
    

    And the HTML:

        <div class="fade">
                <img src="logo.png" alt="Who we are" />
                <div>
                    <img src="logoalt.png" alt="Who we are" />
        </div>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Morning all, I have a list of images like so: <ul id=preload style=display:none;> <li><img
Morning stackoverflow, I have a repeater, with the following code in my aspx page;
Morning all, I know that this sounds like a simple referencing problem from the
Good Morning Stackoverflow-ka-teers, I am creating a raffle form that allows you to enter
Good Morning Justice League of Stackoverflow, I have here a problem that may stump
Morning! I've created a small NDK project which allows dynamic serialisation of objects between
good morning, I was trying the SharedPreferences Class and I have created two classes,
I've spent the morning reading through page after page of StackOverflow posts about this
Morning all! My MySQL query returns a PHP variable name which I'd like to
Good Morning Stack Overflow, I'm new to asp.net and have a problem I'm trying

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.