Slick Slider Contribution

A Base fiddle for use in the issue section of github https://github.com/kenwheeler/slick/issues

by DannyEnglander

HTML

<link rel="stylesheet" href="http://cdn.jsdelivr.net/jquery.slick/latest/slick.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/jquery.slick/latest/slick-theme.css">
<script src="https://rawgit.com/fredkingham/slick/master/slick/slick.js"></script>
<!--              ^
    Use the FORK, Luke.
    create your own new fiddle test case.
-->

<section class="slider">
    <div>slide1</div>
    <div>slide2</div>
    <div>slide3</div>
    <div>slide4</div>
    <div>slide5</div>
    <div>slide6</div>
</section>

Pause the carousel, then hover over the carousel and then hover away. The carousel will auto re-start.
<div class="lower">
<button class="pause">Pause</button>

<button class="play">Play</button>
</div>

CSS

.slider {

    width: 80%;
    margin: 40px 0 0 10%;

}

.lower{
    margin-top: 100px;
}

.slick-slide {

    background: skyblue;
    color: white;
    padding: 30px;
    font-size: 30px;
    font-family: "Arial";

}

.slick-prev:before, 
.slick-next:before {

    color: black;

}

.slick-slide:nth-child(1),
.slick-slide:nth-child(3),
.slick-slide:nth-child(5),
.slick-slide:nth-child(7),
.slick-slide:nth-child(9),
.slick-slide:nth-child(11) {
     background: teal;
}

JavaScript

/**
    This fiddle is using the latest version 
    of Slick and jQuery.

    If your issue occurs in older version; please 
    use the "External Resources" section 
    in the sidebar.
**/


$(".slider").slick({
    autoplay: true,
    dots: true,
    pauseOnDotsHover: true,
		        autoplaySpeed: 1500,
});

$('.pause').on('click', function() {
    $('.slider')
        .slick('slickPause')
        .slick('slickSetOption', 'pauseOnDotsHover', false);
});

$('.play').on('click', function() {
    $('.slider')
        .slick('slickPlay')
        .slick('slickSetOption', 'pauseOnDotsHover', true);
});