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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:22:24+00:00 2026-05-23T06:22:24+00:00

I have a slider that when you click next and previous, the images slide

  • 0

I have a slider that when you click next and previous, the images slide left or right. But I’m having trouble integrating my thumbnails, when if i want to click on a thumbnail, the image will show and then you can click next and previous.

Right now my thumbnails can be clicked, and it shows up but when I click next or previous, its stuck on the same image

I have set up a jsfiddle if someone can help me? first you can see that next and previous will switch images, but once you click on the thumbnails and try next and previous, it won’t change images

http://jsfiddle.net/aQTZ9/14/

Thank you!

EDIT: Do i have to set an array or something? I’m not sure how it will know which image will be next or previous when clicking the links

  • 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-23T06:22:25+00:00Added an answer on May 23, 2026 at 6:22 am

    In your .image click handler, you do this:

    $('#slides img').attr('src', rel);
    

    That will set the src attribute of all the images to rel. So nothing is getting stuck, it just looks that way because all the images in the gallery will be the same after you click on one of the thumbnails.

    Instead, you need to use the rel attribute to find the correct image in the gallery and then call rightImage or leftImage enough times to get it into view. Or, you could add a third function that does the same thing as multiple rightImage or leftImage calls without the intermediate steps.

    Here are some hints.

    1. Get rid of the $('.thumbnail-photos').mouseover stuff, that just ends up binding a new set of click handlers every time the mouse moves over the a thumbnail. Move click handler binding inside there to the outside before you delete it though.

    2. Add id attributes the slide <li> elements to make them easier to find.

    3. Replace the rel attributes with data-slide attributes, the values should match the id attributes` above. This makes it easy to link the thumbnails directly to their slides.

    4. Now the click handler on the thumbnails can get the slide with var $li = $('#' + $(this).data('slide')) (or var $li = $('#' + $(this).attr('data-slide')) in older versions of jQuery).

    5. Now that you have the right $li, you should be able to figure out which direction and how far you need to animate the left value of $('#slides ul').

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

Sidebar

Related Questions

im creating a slider body but got a problem. I have a next previous
I'm having trouble with a slider I have made, I need it so that
I have some sliding images that I am having move with .animate. When I
I have site http://elitereviewtheme.com/amazon/test/ on which i customize the slider. But problem is that
I have a slider that has a fade-in and fade-out transition. It basically cycles
I have a slider that returns values from 0.0f to 1.0f. I want to
I have a StackPanel inside of a ScrollViewer. I have a slider that does
I have an SVG slider that I've been working on ... please see it
I have this complicated slider that utilizes tons of animation. I'm trying to find
I have Slider in my app that is connected to a few methods. In

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.