T
T
tyrion12019-08-03 10:09:19
JavaScript
tyrion1, 2019-08-03 10:09:19

How to scroll SlickSlider to the clicked slide?

There is a regular slick slider on the site.
The slick wrapper was removed, the date slider had no borders.
5d453367b4dcc066953008.jpegntscr.com/onrsth" alt="image"/>
How to scroll to it when clicking on the previous slide or next from the current one?
5d453377cd861519735706.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-08-03
@tyrion1

Add to slider settings . Or, if you are not looking for direct paths:focusOnSelect: true

$slick.on('click', '.slick-slide', function() {
  $slick.slick('slickGoTo', this.dataset.slickIndex);
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question