I am trying to create a slider that includes:
- 3 different images
- 3 different text captions
- A button that opens a modal dialog similar to Bootstrap, with each slide's button displaying unique text in the modal
- The slider should automatically slide
For reference, please view this screenshot of the slider image
$(".center").slick({
dots: true,
infinite: true,
centerMode: true,
slidesToShow: 3,
slidesToScroll: 3,
autoplay: true,
speed: 300,
dots: true,
arrows: true
});
html, body {
margin: 0;
padding: 0;
}
* {
box-sizing: border-box;
}
.slider {
width: 50%;
margin: 100px auto;
}
.slick-slide {
margin: 0px 20px;
}
.slick-slide img {
width: 100%;
}
.slick-prev:before,
.slick-next:before {
color: black;
}
.slick-slide {
transition: all ease-in-out .3s;
opacity: .2;
}
.slick-active {
opacity: .5;
}
.slick-current {
opacity: 1;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="//cdn.jsdelivr.net/gh/kenwheeler/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e1928d88828aa1d0cfd9cfd1">[email protected]</a>/slick/slick.min.js"></script>
<link href="//cdn.jsdelivr.net/gh/kenwheeler/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="52213e3b313912637c6a7c">[email protected]</a>/slick/slick-theme.css" rel="stylesheet"/>
<link href="//cdn.jsdelivr.net/gh/kenwheeler/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6516090c060e25544b5d4b">[email protected]</a>/slick/slick.css" rel="stylesheet"/>
<div class="slider-inner">
<section class="center slider">
<div>
<img src="http://placehold.it/350x300?text=1">
</div>
<div>
<img src="http://placehold.it/350x300?text=2">
</div>
<div>
<img src="http://placehold.it/350x300?text=3">
</div>
</section>
</div>
Just a note: I am using Bootstrap 4.5 in my project.
I would appreciate some help as I am new to this area and this is for a school project.