Posted in slick slider
4567
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
66
This Month
410
This Year
1082

No Items Found.

Add Comment
Type in a Nick Name here
 
Related Search Terms
Search Code
Search Code by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

Subscribe to weekly updates about things i have added to the site or thought interesting during the last week.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
When I realized that, no individual step is hard in any process. Building this airport I'm standing in right now started with a guy writing the architectural plans on paper. That's not hard for him to do. Then laying the first beam isn't had. The whole thing is really hard. So, just take each step kind of piece by piece and when I was able to do that and stop trying to chase this prize and started putting in the work, things just started coming together.
Unknown
Random CSS Property

visibility

The visibility CSS property shows or hides an element without changing the layout of a document. The property can also hide rows or columns in a <table>.
visibility css reference