slick slider
Posted in
6827
4:21 am, March 1, 2023
Chat GPT slick slider code testing
slick slider testing using code from chat gpt
1. write for me the code to embed a video into slick slider in html and css
2. can you also add the javascript required to get this working
3. can you tell me the cdnjs links for slick slider css and js embed tags
HTML
<div class="slider">
<div>
<iframe src="https://www.youtube.com/embed/dQw4w9WgXcQ"></iframe>
</div>
<div>
<iframe src="https://www.youtube.com/embed/2Vv-BfVoq4g"></iframe>
</div>
<div>
<iframe src="https://www.youtube.com/embed/NBfi8OEz0rA"></iframe>
</div>
</div>
CSS
.slider {
width: 80%;
margin: 0 auto;
}
.slick-slide {
margin: 0px 20px;
}
iframe {
width: 100%;
height: 400px;
border: none;
}
Scripts
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css"/>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script>
Javascript
$(document).ready(function(){
$('.slider').slick({
infinite: true,
slidesToShow: 1,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 2000,
responsive: [
{
breakpoint: 768,
settings: {
arrows: false,
dots: true
}
}
]
});
});
View Statistics
This Week
184
This Month
810
This Year
3345
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