darick
darick

Reputation: 1

Slick Carousel Autoplay left or right when hover

hi everyone here is my test page so you can see what help that i need, http://jjvirgin.24techstuddev.com/testpage/

i want to continues slide left or right when hover, cause at the moment its only sliding left or right once. i want to make it continue sliding to left when you hover on the left button, or continue sliding to the right when you hover to the right button.

here is the code that i used to make it slide once.

<script>
jQuery(document).ready(function() {
    jQuery('.slick-prev').mouseover(function() {
        jQuery('.swiper-wrapper').slick('slickPrev')
    });
    jQuery('.slick-next').mouseover(function() {
        jQuery('.swiper-wrapper').slick('slickNext')
    });
});
</script>

Upvotes: 0

Views: 2264

Answers (1)

Jan
Jan

Reputation: 31

Instead ou using 'slickPrev' and 'slickNext' methods use slickPlay on mouseover() and slickPause on mouseout()

Upvotes: 3

Related Questions