<!DOCTYPE html>
<html lang="en"><b><i></i></b>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style/bootstrap.min.css">
<script src="https://kit.fontawesome.com/2d3f6e9ee4.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="style/style.css">
</head>
<body>
<div class="container">
<ul class="category__menu">
<li class="category__menu_items allPost" data-category="allPost">all color</li>
<li class="category__menu_items orange" data-category="orange">orange</li>
<li class="category__menu_items olive" data-category="olive">olive</li>
<li class="category__menu_items silver" data-category="silver">silver</li>
<li class="category__menu_items aqua" data-category="aqua">aqua</li>
</ul>
<div class="slider">
<div class="slider__items orange"></div>
<div class="slider__items olive"></div>
<div class="slider__items silver"></div>
<div class="slider__items aqua"></div>
<div class="slider__items olive"></div>
<div class="slider__items orange"></div>
<div class="slider__items silver"></div>
<div class="slider__items orange"></div>
<div class="slider__items aqua"></div>
<div class="slider__items aqua"></div>
</div>
</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.4.1.js"></script>
<script src="js/slick.min.js"></script>
<script src="js/main.js"></script>
</body>
</html>
$(function(){
$('.slick').slick({
slidesToShow: 3,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 2000,
infinite: true,
});
$('.category__menu li').on('click', function() {
var filterClass = $(this).data('category');
$('.slick').slick('slickUnfilter');
$('.slick').slick('slickFilter', filterClass);
});
});