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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:08:25+00:00 2026-06-10T09:08:25+00:00

I am creating an image thumbnail slider, As I click on the thumbnail Image

  • 0

I am creating an image thumbnail slider, As I click on the thumbnail Image a pop-up box with larger Image will be open. Here I need to add the next and prev button to the larger image.

Here it is what I practiced:

HTML

<div id="wrapper">
  <div id="content">
  <div id="content_left">

  </div>
<ul id="thumb_holder">
  <li><a href="javascript:void(0);"><img src="img/img1_thumb.jpg" alt="motherly" /> </a></li>
    <li><a href="javascript:void(0);"><img src="img/img2_thumb.jpg" alt="xo" /> </a></li>
    <li><a href="javascript:void(0);"><img src="img/img3_thumb.jpg" alt="keep your eyes open" /> </a></li>
    <li><a href="javascript:void(0);"><img src="img/img4_thumb.jpg" alt="bacon bits" /> </a></li>
    <li><a href="javascript:void(0);"><img src="img/img5_thumb.jpg" alt="nature sent packing" /> </a></li>
    <li><a href="javascript:void(0);"><img src="img/img6_thumb.jpg" alt="snow man" /> </a></li>
    </ul>
    </div>
    <div id="large_image_holder">
      <ul id="large_images">
        <li><img src="img/img1.jpg" alt="motherly" /></li>
        <li><img src="img/img2.jpg" alt="xo" /></li>
        <li><img src="img/img3.jpg" alt="keep your eyes open" /></li>
        <li><img src="img/img4.jpg" alt="bacon bits" /></li>
        <li><img src="img/img5.jpg" alt="nature sent packing" /></li>
        <li><img src="img/img6.jpg" alt="snow man" /></li>
      </ul>
    </div>

  </div>

</div>

Jquery

$(document).ready (function(){      
    $("#large_images li").each(function(index, element){$(element).attr("class", 'hide');});
    $("#large_images li").each(function(index, element){$(element).attr("id", 'img'+index);});
    $("#thumb_holder li a").each(function(index, element){$(element).attr("rel", 'img'+index);});

    var mainImg ='img0';
    var current = 'img0';

    $('#img0').css('display', 'inline');
    $('#img0').addClass('current');

    $('#thumb_holder li a').click (function(){                                 
        mainImg = $(this).attr('rel');
        if(mainImg != current){
        $('.current').fadeOut('slow');
        $('#'+mainImg).fadeIn('slow', function(){
        $(this).addClass('current');
        current = mainImg;

        });
        }
    });
});
  • 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-10T09:08:26+00:00Added an answer on June 10, 2026 at 9:08 am
    <div id="picture">
        <a id="prev" class="nav"> Next</a>
        <a id="next" class="nav"> Prev</a>
    </div>​
    

    And the CSS

    a.nav{
        position:absolute;
        top:10px;
        cursor:pointer;
    }
    #picture a#prev{
        color:red;
        left:10px; 
        /*background: add images for nav buttons if needed*/
    }
    #picture a#next{
        color:blue;
        right:10px;
    }
    #picture{
       position:relative;
    }
    

    And for the click handler..

    $('#picture').on('click', '.nav', function(){
         alert(this.id); //Do what you do in $('#thumb_holder li a').click..
    });​
    

    DEMO

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

Sidebar

Related Questions

I'm creating a thumbnail for an image using the following code: im = Image.open('original.jpg')
I have encountered a problem with creating a thumbnail from an uploaded image file,
the tutorial here http://www.edumobile.org/android/android-beginner-tutorials/creating-image-gallery/ teaches how to put images from resources in gallery here's
I am creating a jquery image gallery and I am using fancy box to
I am working on creating thumbnail image from the first page of pdf file.
I currently creating a project, in which a user can click on thumbnail of
I am creating thumbnail image in MKMAPView without Google logo ,Is it Acceptable by
everything in my code is working great for creating a thumbnail image of an
I am creating an image (some sort of copy of another gallery image) using
I am creating an image dynamically using php. The image is being created if

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.