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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:47:37+00:00 2026-05-26T18:47:37+00:00

How to show/hide big image by clicking on thumbnails? I need like this Try

  • 0

How to show/hide big image by clicking on thumbnails?

I need like this

enter image description here

Try with JSFiddle here http://jsfiddle.net/jitendravyas/Qhdaz/

Is it possible with CSS only. if not then jQuery solution is OK.

An is it good to use <a href=#"> even it’s not opening any new page in same or new tab.

Edit:

I forgot to add. it should work on iPad too

  • 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-26T18:47:38+00:00Added an answer on May 26, 2026 at 6:47 pm

    See this example:

    No preloading

    HTML:

    <div id="big-image">
        <img src="http://lorempixel.com/400/200/sports/1/">
    </div>
    
    <div class="small-images">
        <a href="http://lorempixel.com/400/200/sports/1/"><img src="http://lorempixel.com/100/50/sports/1/"></a>
    <a href="http://lorempixel.com/400/200/fashion/1/" class=""><img src="http://lorempixel.com/100/50/fashion/1/"></a>
    <a href="http://lorempixel.com/400/200/city/1/"><img src="http://lorempixel.com/100/50/city/1/"></a>
    </div>
    

    Javascript (jQuery)

    $(function(){
        $(".small-images a").click(function(e){
            var href = $(this).attr("href");
            $("#big-image img").attr("src", href);
            e.preventDefault();
            return false;
        });
    });
    

    Currently only 1 big image, when clicking on an A, the href of the A is copied as SRC of the big image.

    Live example: http://jsfiddle.net/Qhdaz/1/

    If you wan’t to do it without the extra DOM progressing, you can add 3 big images, and load them directly. The above solution does not preload the images, the below function will.

    With preloading

    HTML:

    <div id="big-image">
        <img src="http://lorempixel.com/400/200/sports/1/">
        <img src="http://lorempixel.com/400/200/fashion/1/">
        <img src="http://lorempixel.com/400/200/city/1/">
    </div>
    
    <div class="small-images">
        <img src="http://lorempixel.com/100/50/sports/1/">
        <img src="http://lorempixel.com/100/50/fashion/1/">
        <img src="http://lorempixel.com/100/50/city/1/">
    </div>
    

    Javascript:

    $(function(){
        $("#big-image img:eq(0)").nextAll().hide();
        $(".small-images img").click(function(e){
            var index = $(this).index();
            $("#big-image img").eq(index).show().siblings().hide();
        });
    });
    

    http://jsfiddle.net/Qhdaz/2/

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

Sidebar

Related Questions

I have a show/hide toggle working well in multiple instances (thanks to help here
I implemented this Jquery show/hide code and everything works fine except that the box
I'm trying to create a standardized show/hide element system, like so: <div class=opener popup_1>Click
I'm looking for a show/hide component, much like the toolbox from VS2010 and eclipse's
I want to show a big Image when I press the small thumbnail. A
I need to show/hide some divs depending on selected options. I'm using .change function.
In this example . By clicking on thumbnail , big images is getting changed.
I have a show hide table rows feature but would now like to change
I got this code on here recently <script type='text/javascript'> $('#discountselection').hide(); $('#No').click(function(){ $('#discountselection').hide(); }); $('#Yes').click(function(){
I'm trying to show/hide a movieclip (or graphic) symbol that is on a layer

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.