Answer the question
In order to leave comments, you need to log in
How to make one scroll slider and stop it?
It is necessary that when you click on the button that will open the block with the slider, the slide scrolls once immediately and then the scrolling stops. I don't know how to write it in jquery
Here is the button that will be clicked. There will be a lot of buttons, so when you click on another button, scrolling in the slider works once again.
jQuery('.sect_2_catalog a').on('click',function(){
var scroll_el = jQuery(this).attr('href');
});
jQuery('.slider').slick({
dots: false,
infinite: true,
speed: 500,
autoplaySpeed: 1000,
autoplay: false,
arrows: true,
slidesToShow: 1,
slidesToScroll: 1,
});
Answer the question
In order to leave comments, you need to log in
Possible:
1. Enable autoplay in "slider code"
.....
autoplay: true,
.....
$('.slider').on('afterChange', function(event, slick, direction){
$('.slider').slick('slickPause');
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question