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

  • Home
  • SEARCH
  • 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 6205173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:13:31+00:00 2026-05-24T05:13:31+00:00

Very straightforward question: I’ve built a slider with (dynamic amount of slides), with a

  • 0

Very straightforward question:

I’ve built a slider with (dynamic amount of slides), with a sidebar for expanded navigation (#slidercontrols). Every child of this navigation sidebar should link to their own corresponding slide.

I’m currently working with a very quick, simple setup which just repeats the same code for each slide and works just fine, but I’m sure we’ll all agree that it’s a very messy solution. Not very DRY. For educational reasons, I’m curious how you pro’s would solve this matter 🙂

How could you build a simple loop that directs #slidernavigation child X to slide X? You’d need some sort of dynamic selector that I’m unfamiliar with…

Fiddle: http://jsfiddle.net/qbahamutp/TsJCP/

  • 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-24T05:13:31+00:00Added an answer on May 24, 2026 at 5:13 am

    Well at first I would suggest that you use just one selector. Then how to recognize the index? There are many ways, but in this case one way could be storing data to div element with jQuery http://api.jquery.com/jQuery.data/

    Then when you click any div, you just take the index from the saved data and use that.

    If you know that the divs are always in indexed order, you could just use .index() aswell.
    Example with .index() http://jsfiddle.net/TsJCP/1/

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

Sidebar

Related Questions

Apologies or asking what is probably a very straightforward question, but I'm new to
The question is very straightforward: Is it possible to parse PHP using PEG? I
the question is very straightforward: Good DAL library for PHP which has the similar
This is likely a very simple question with a straightforward answer but I'm something
this is a very straightforward and easy question. So please give me an easy
Well, the question seems very straightforward, but it isn't. I want to set a
Very straightforward CSS question that I haven't been able to find the answer to
It's a pretty straightforward question but I can't find very good documentation on the
Somehow, I have a feeling my question is very straightforward and noobish, but I
I have this very straight forward question regarding Thread and Timer classes in Java

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.