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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:54:22+00:00 2026-05-26T17:54:22+00:00

I have a slide gallery, whereby when you click on a thumbnail, it retrieves

  • 0

I have a slide gallery, whereby when you click on a thumbnail, it retrieves the image reference in the thumbnail and displays it in the main panel.

Now I’ve added navigation controls but i’m not sure how to wire it altogether so that if you click on next/previous it navigate through the thumbnail and highlight the one you are on.

The code is too long to paste here, but here is the fiddle:

http://jsfiddle.net/calebo/QuXYV/

ps: JavaScript only, no jQuery.

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

    I reworked your code and got it working here. I would recommend refactoring your code a bit to clean it up. I would say create an array of objects that hold the image url and the caption:

    var objArray, obj;
    for(var i = 0 ....) {
        obj = {
            url : "http://foobar.com/foo.png",
            caption : "Caption"
        };
        objArray.push(obj);
    }
    // then index with
    var currObj = objArray[current];  // where 'current' is the variable you are using for state
    

    Essentially what I did is move some of the code out of bindImage and into a function called ‘set’ (you probably want to rename this). I also commented out the line where you remove the anchor’s href.

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

Sidebar

Related Questions

I have created a XML image gallery, which displays text in between each slide.
I have a slide gallery which adds a class curSlide to an image when
I have an image gallery which works great. When the last slide is reached
I have an image gallery app that has a slider to control the width
i have one slide panel login box with jquery and its works fine only
I have a slide show ..... <script type=text/javascript> <!-- var image1=new Image() image1.src=slide-image-1.png var
I have an image gallery which loads a detail image, then draws a line
currently I have the a basic jQuery gallery: <ul> <li>IMAGE</li> <li>IMAGE</li> </ul> // with
I have a Nivo slide gallery and am experiencing some weird inconsistency between browsers.
I have an image gallery which holds lots of inline-block containers (similar to a

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.