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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:55:57+00:00 2026-05-23T17:55:57+00:00

I have some thumbnails + a camera icon on a page and a main

  • 0

I have some thumbnails + a camera icon on a page and a main image, currently you click the thumbnail and the main image fades out and a full size version fades in of the thumbnail.

Now if a user clicks the camera icon the full image should fade out and a swf video should fade in, how can I achieve this?

Here is the current code i’m using for the images:

$('a.thumbnail').click(function(){
    var src = $(this).attr('href');

    if (src != $('img#full_image').attr('src').replace(/\?(.*)/,'')){
        $('img#full_image').stop().animate({
            opacity: '0'
        }, function(){
            $(this).attr('src', src+'?'+Math.floor(Math.random()*(10*100)));
        }).load(function(){
            $(this).stop().animate({
                opacity: '1'
            });
        });
    }
    return false;
});

Thanks

  • 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-23T17:55:57+00:00Added an answer on May 23, 2026 at 5:55 pm

    Right so here’s the code that I am using:

    <script type="text/javascript" language="javascript" src="/jquery/jquery-1.5.1.js"></script> 
    <script type="text/javascript" language="javascript" src="/swfobject/jquery.swfobject.1-1-1.min.js"></script>
    
    <table>
        <tr>
            <td>
                <img id="full_image" src="1.jpg" alt="0" width="360" height="360" border="0" />
                <span id="flash" style="width:360px;height:360px;border:0px;margin:0px;padding:0px;">
                <object data="fireworks.swf" type="application/x-shockwave-flash" id="flash_99458582" width="360" height="360">
                    <param name="movie" value="fireworks.swf">
                    <param name="wmode" value="opaque">
                </object>
                </span>
            </td>
            <td>
                <table>
                    <tr>
                        <td><a href="1.jpg" class="thumbnail"><img src="1.jpg" width="70" height="70"></a></td>
                    </tr>
                    <tr>
                        <td><a href="2.jpg" class="thumbnail"><img src="2.jpg" width="70" height="70"></a></td>
                    </tr>
                    <tr>
                        <td><img src="3.jpg" width="70" height="70" class="video"></td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    
    
    <script type="text/javascript">
    $(document).ready(function() {
        $("#flash").hide();
        $('a.thumbnail').click(function(){
            $("#flash").hide();
            $("img#full_image").show();
            var src = $(this).attr('href');
            if (src != $('img#full_image').attr('src').replace(/\?(.*)/,'')){
                $('img#full_image').attr('src', src+'?'+Math.floor(Math.random()*(10*100)));                
            }
            return false;
        });
    
        $('img.video').click(function(){
            $("img#full_image").hide();
            $("#flash").show();
        });
        return false;
    });
    </script>
    

    This will get most of you roughly started. You will probably want to create some sort of loading, for images which are large, or a preloader.

    Also this code just switches image / swf it does not fadeIn / fadeOut (because of the flash file). When I get some time I may look into trying to create the effect by overlaying a white image(my background I’m using is white) and increase its opacity etc.

    Thanks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some Thumbnail images .I want to display image thumbnails in a Panorama(or
i have some javascript in the head of a page that controls an image
I currently have a working gridview displaying some thumbnails. Currently, when you select an
I have some server code that is generating thumbnails when an image is uploaded.
I'm just starting out with JQuery in a Drupal environment. I have some thumbnails,
I have a site housing a good deal of image thumbnails (currently ~500) on
I have some thumbnails below the main video container. I will like when you
I display some objects that have thumbnails in two ways: one in a DataGridView,
Need some help, please. I have a line of horizontal thumbnails loaded as ONE
I have some classes layed out like this class A { public virtual void

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.