I'm looking to customize my slider with a timer pagination feature using progress bars instead of dots, similar to how it is on . Currently, I am using slick.js
for my slider implementation.
What is the best way to replace the default pagination buttons with progress bars in my slider?
$(document).ready(function () {
$('.slider').slick({
infinite: true,
autoplay:true,
dots: true,
arrows: false,
autoplaySpeed: 3000,
slidesToShow: 1,
slidesToScroll: 1
});
});
.slider .slick-dots {
padding: 0;
}
.slider .slick-dots li {
position: relative;
display: inline-block;
width: 19%;
height: 15px;
margin: 0 2px 0 0;
padding: 0;
cursor: pointer;
background: #ccbdb6;
transition: width 5s ease-out 0s;
}
.slider .slick-dots li:last-child {
margin-right: 0;
}
.slider .slick-dots li:hover,
.slider .slick-dots li.slick-active {
background: #a08a7f;
}
.slider .slick-dots li button {
display: none !important;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/jquery.slick/1.6.0/slick.css"/>
<div class="slider">
<div>
<h3>1</h3>
</div>
<div>
<h3>2</h3>
</div>
<div>
<h3>3</h3>
</div>
<div>
<h3>4</h3>
</div>
<div>
<h3>5</h3>
</div>
</div>
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery.slick/1.6.0/slick.min.js"></script>