K
K
Kak_B_CTapou_Cka3ke2017-09-26 17:42:48
JavaScript
Kak_B_CTapou_Cka3ke, 2017-09-26 17:42:48

Slick Slider: select a random slide and go to the page, how?

How to select a random slide from 0 to 8 for a slick slider?

function getRandom(){
$('.multiple-items0777').slick('slickGoTo','3');
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danakt Frost, 2017-09-26
@Kak_B_CTapou_Cka3ke

function setRandomSlide() {
    var randomSlideId = Math.random() * 9 | 0
    $('.multiple-items0777').slick('slickGoTo', randomSlideId.toString())
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question