Skip to content

Instantly share code, notes, and snippets.

@ivan-kalachikov
Created October 18, 2019 14:26
Show Gist options
  • Save ivan-kalachikov/f339fb42e529234ea30518dc4a9c18f1 to your computer and use it in GitHub Desktop.
Save ivan-kalachikov/f339fb42e529234ea30518dc4a9c18f1 to your computer and use it in GitHub Desktop.
Multiple dots Slick
$('.banners').slick({
adaptiveHeight: false,
dots: true,
arrows: false,
autoplay: true,
autoplaySpeed: 6000111,
infinite: true,
appendDots: $('.banner .text')
}).on( 'afterChange', function( event, slick, currentSlide ) {
$.each(slick.$dots, (i, el) => {
$(el).find('li').eq(currentSlide).addClass('slick-active').find('button');
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment