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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:19:58+00:00 2026-06-09T12:19:58+00:00

I am attempting to implement a script that will fade in a new set

  • 0

I am attempting to implement a script that will fade in a new set of images, replacing an old set, upon a click event on a button that will be an image or piece of text. To get an idea of what I am looking to replicate (in flash, unfortunately), see the “teaching” section of http://seanjustice.com/.

I found this jfiddle from another topic on stackoverflow, but I wasn’t sure how to use a button and mouse click to replace the set of images instead of using just a simple fade upon hover effect.

So can anyone help me out with suggestions? How do I use a button that will trigger a swap of images?

  • 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-09T12:19:59+00:00Added an answer on June 9, 2026 at 12:19 pm

    Using the jsfiddle you provided you could do something like this:

    http://jsfiddle.net/H8z2G/41/

    $('.fadein').each(function() {
    
        var std = $(this).attr("src");
        var hover = std.replace("text=1", "text=2");
        $(this).wrap('<div />').clone().insertAfter(this).attr('src', hover).removeClass('fadein').siblings().css({
            position:'absolute'
        });
    
        $('#swapper').click(function() {
            $('.fadein').stop().fadeTo(600, 0);
        });
    });​
    

    Sorry, here’s the markup:

    <img class="fadein" src="http://dummyimage.com/180x100/000/fff&text=1" alt="" />
    <img class="fadein" src="http://dummyimage.com/180x100/cf5/fff&text=1" alt="" />
    <img class="fadein" src="http://dummyimage.com/180x100/f0f/fff&text=1" alt="" />
    
    <a href="#" id="swapper">Click Here</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am attempting to implement a form on APEX that allows the user (in
I am attempting to implement thread-safe usage of ConcurentHashMap within singleton spring service that
I'm attempting to implement OpenID with ASP.NET MVC (Yeah, we haven't heard that one
i'm attempting to implement a mouse event where Mouse_Move can only occur if Mouse_Down.
I am attempting to implement a function that sorts a randomly generated vector using
i am attempting to implement a built in controller that is part of the
I am attempting to implement xmpp chat/collaboration between two C# desktop clients that exchange
I've been attempting to implement the new Facebook open graph features with my flash
I am attempting to implement an interface in C++ for a game that I
I'm attempting to implement a decorator on certain methods in a class so that

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.