Slider with "Random" button.

I wanna Create sth like this, but im relativly new to javascript

the main features shout be:

  1. the Slider should start at a random position (image)
  2. when you “click” the “Random” button, the slider moves x(maybe 20images)
  3. there not be everytime “20images”, so it need to be a infinte slide.
  4. 3 images shown, and the image that was picked by the “randombutton” must be in the middle

i hope you understand, what i mean :slight_smile:, if there are any questions, dont wait and ask.

if anyone could help me, that helped me so much!! <3

Have you read this article:

It doesn’t solve all of your conditions, but it sets you up for figuring out the rest. We can help with the missing pieces :slight_smile:

i´ve read it, and reproduced it, but i dont know, how to make it “random”
-random placing
-random start

  • with “click” get to to a position “20 images” away


That is a good one! Let me fiddle with this for a bit and see what happens. It will definitely involve fiddling with the activeLink value which the slider relies on to know where it is currently and where to go next! :stuck_out_tongue:

The infinite slide thing will be more of a challenge, for we’ll need to populate and remove elements from the DOM frequently.

alfter click the button and after the slide stops, it should return and make again a random start ect :slight_smile:

i found a infinite slider here: -

someone know, how i start randomly, and when i press “next” it goes ,maybe 50images away ? :slight_smile:

This article just came out a few days ago. Seems timely :stuck_out_tongue:

There is one with an infinite scroller there as well.


i already have a infinte slider, but thx, but i still dont know how to start randomly, and when i press “next” it goes, maybe 50 images away :slight_smile: (gist link=my code of infinite slider)