Answer the question
In order to leave comments, you need to log in
How to make your own navigation for Slick Slider?
Is it possible to make custom navigation for slick slider? Do not change the look of the existing one, namely, make your own?
There are 6 mini blocks with text and 6 slides. It is necessary to make accordingly, so that when you click on a certain block, the corresponding slider opens. Is such an implementation possible in principle?
Answer the question
In order to leave comments, you need to log in
Get elements that will act as buttons for moving to slides; hang a click handler on them, in which you get the index of the clicked element and switch the slider to the corresponding slide:
const $buttons = $('здесь селектор ваших кнопок').click(function() {
$slick.slick('slickGoTo', $buttons.index(this));
});
$slick.on('init beforeChange', function(e, slick, currSlide, nextSlide) {
$buttons
.removeClass('active')
.eq(e.type === 'init' ? slick.currentSlide : nextSlide)
.addClass('active');
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question