Calling multiple slick slider on same page – arrows do not work – how to fix?

View QuestionsCategory: CodeCalling multiple slick slider on same page – arrows do not work – how to fix?
admin Staff asked 5 years ago
  • multiple slick sliders on same page
  • drag works
  • arrows show, but clicking on arrows do not work.
  • possible symptoms
    • only last slider arrows work
    • clicking on 1 arrow moves multiple sliders
1 Answers
admin Staff answered 5 years ago

This can be fixed with proper selector. See below.
Replace the eq(1) with the correct # in lines 1,3,4
eq(1) actually means the 2nd one. The index starts from 0

$('.responsive').eq(1).slick({
arrows: true,
prevArrow: $('.responsive').eq(1).siblings('.prev').first(),
nextArrow: $('.responsive').eq(1).siblings('.next').first(),
infinite: false,
speed: 300,
slidesToShow: 5,
slidesToScroll: 4,
});