admin管理员组

文章数量:1344204

How can I disable focus in slick slider when I click in slider or control button slider was focused in center monitor and when I scroll page after some time page back to slider. I tried focusOnSelect: false it's not working.

$(".page-work article .field-name-field-image-p .field-items").slick({
    /*  adaptiveHeight: true, */
    autoplay: false,
    arrows: true,
    focusOnSelect: false,
    dots: true,
});

How can I disable focus in slick slider when I click in slider or control button slider was focused in center monitor and when I scroll page after some time page back to slider. I tried focusOnSelect: false it's not working.

$(".page-work article .field-name-field-image-p .field-items").slick({
    /*  adaptiveHeight: true, */
    autoplay: false,
    arrows: true,
    focusOnSelect: false,
    dots: true,
});
Share Improve this question edited Jul 12, 2016 at 9:12 Rory McCrossan 338k41 gold badges320 silver badges351 bronze badges asked Jul 12, 2016 at 9:10 MojitoMojito 11 gold badge1 silver badge2 bronze badges 1
  • Choose the answer that solves your problem, please – lucifer63 Commented Dec 19, 2018 at 13:53
Add a ment  | 

2 Answers 2

Reset to default 13

Try this:

$('.your-class').slick({
    accessibility: false,
});

The cause:

https://github./kenwheeler/slick/blob/1.8.0/slick/slick.js#L1703

try making centerMode: false

Reference from http://kenwheeler.github.io/slick/

本文标签: javascriptHow can I disable focus in slick sliderStack Overflow