D
D
Denis Bukreev2016-10-09 11:46:45
JavaScript
Denis Bukreev, 2016-10-09 11:46:45

How to disable swipe after a certain action on the page?

So it goes.

Slick is initialized, swipes are allowed.

How can I prevent swiping after a specific page action?
For example, inside a script that handles a button click.
In the same way, it will be necessary to return the ability to swipe.

The documentation describes properties only during initialization, but how to change them after?

UPD:
So far I've implemented it like this:

const interviewsSlider = $('.interviews.slider').slick();
// .... code .....
interviewsSlider[0].slick.options.swipe = false;

But this is some kind of sad crutch

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Андрей Верх, 2016-10-09
@denisbookreev

Вроде всё в доке написано:

$('.slider').slick("slickSetOption", "draggable", false, false);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question