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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:57:38+00:00 2026-06-18T09:57:38+00:00

I have a gallery of thumbnails that display a larger version when you click

  • 0

I have a gallery of thumbnails that display a larger version when you click them. I want that larger image to appear in lightbox when clicked. On page load, the initial image displayed works fine. But, when I click one of the thumbnails, while it appears as a larger image, lightbox only displays the original image. Am I missing some code, or is this a possible limitation of lightbox?

Go here for example

<a href="/uploads/portfolio/fullsize/bigimage.jpg" id="bigImgLink" rel="lightbox"><img src="/uploads/portfolio/fullsize/bigimage.jpg" alt="" class="fullsize" id="bigImg" /></a>

Snippet of the Javascript

imagearray = new Array('CapitalHealth_01alt_WEB-2225.jpg','CapitalHealth_16_WEB-1311.jpg','CapitalHealth_18retouched_WEB-6133.jpg','CapitalHealth_09_retouched_WEB-6020.jpg','CapitalHealth_13_WEB-8373.jpg');
currentimage = 0;
totalimages= imagearray.length;
        $(".navigation").click(function() {
                            if ( $(this).attr('id') == 'previous-image' ) {
                                currentimage = (currentimage > 0) ? currentimage - 1 : totalimages - 1;
                            } else {
                                currentimage = (currentimage < (totalimages - 1)) ? currentimage + 1 : 0;
                            }

                            $("img#bigImg").attr('src',"/uploads/portfolio/fullsize/" + imagearray[currentimage]);
                            $("a#bigImgLink").attr('href',"/uploads/portfolio/fullsize/" + imagearray[currentimage]);
    });
  • 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-18T09:57:39+00:00Added an answer on June 18, 2026 at 9:57 am

    this never gets called $(".navigation").click(function() { You can debug this using firebug by adding a watch. Just suggesting this in case you didn’t know.

    Change this to the correct selector and it will work. Something like $(".thumbnail").click(function() {

    Also it might be better to just use a carousel script.

    http://www.tripwiremagazine.com/2012/12/jquery-carousel.html

    this one is pretty good http://www.agilecarousel.com/flavor_2.htm

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

Sidebar

Related Questions

I'm hacking a Lightbox javascript image plugin to display thumbnails from a gallery on
I have photo gallery code that does image re-sizing and thumbnail creation. I use
I have an image gallery that I created by reading the contents inside a
I have the following bit of code to display thumbnails on a page: <div
I have made an image gallery. What currently happens is the following. I display
i have some javascript in the head of a page that controls an image
I have an image gallery that displays a list of thumbnail images. I'm using
I have a gallery of thumbnail images. Below each image, I display the thumbnail
I am creating a website that has an image gallery. You have a side
I have got an image gallery that swaps the main image when a thumbnail

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.