Slick Slider
Posted in
14102
4:55 am, February 9, 2022
Slick Slider Showing Multiple Items at a time
Just wanted to test some review type items showing more than one on slick, Seems to work well.
This shows two items at a time, but you can show as many as you like.
Could be good for a testimonials type slider, or maybe ratings system.
HTML
<h2>Slick Slider Multi Item</h2>
<p>Showing how to add custom html into the slide items and show more than one at a time</p>
<div class='slider-multi'>
<div class='slide slide-1'>
<h3>Slide One</h3>
<p>Some text for slide one.</p>
<p class="stars"><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i></p>
</div>
<div class='slide slide-2'>
<h3>Slide Two</h3>
<p>Some text for slide two.</p>
<p class="stars"><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i></p>
</div>
<div class='slide slide-2'>
<h3>Slide Three</h3>
<p>You guessed it... Some text for slide three.</p>
<p class="stars"><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i></p>
</div>
</div>
CSS
.slide {
width:300px;
height:200px;
background:#444;
color:#FFF;
margin:10px;
border-radius:10px;
text-align:center;
font-size:34px;
font-weight:bold;
padding:50px;
}
.stars {
color:yellow;
}
.slick-slide {
margin: 0 10px;
}
Scripts
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.css" integrity="sha256-UK1EiopXIL+KVhfbFa8xrmAWPeBjMVdvYMYkTAEv/HI=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick-theme.min.css" integrity="sha256-4hqlsNP9KM6+2eA8VUT0kk4RsMRTeS7QGHIM+MZ5sLY=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.js" integrity="sha256-NXRS8qVcmZ3dOv3LziwznUHPegFhPZ1F/4inU7uC8h0=" crossorigin="anonymous"></script>
Javascript
$(document).ready(function(){
$('.slider-multi').slick({
slidesToShow: 2,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 2000,
dots: true,
arrows:true
});
});
Slick Slider Multi Item
Showing how to add custom html into the slide items and show more than one at a time
View Statistics
This Week
164
This Month
804
This Year
3193
Add Comment
Other Items in Slick Slider
Related Search Terms
Other Categories in Code
alpine js apps c css factorio font awesome images linux quick modals sqlite site bugs site updates slick slider sliders testing windows apps apache api apps asp bat bootstrap bootstrap templates charts cookies core css css filters css grid design elements docker domains emoji fancybox fonts foundation framework gimp git html icons ideas image formatting images javascript javascript functions jquery js linux mac misc modals mysql nginx node php php errors php function php functions php simple html dom pi400 python react regex sections simple_html_dom simplepie php site bugs site documentation slick slider sql sqlite ssh sublime svg svg css templates tools virtual box vscode vue webdev windows windows 11 windows commands wordpress