2 questions on the tabs slick-slider?

penthhouse some reason is not filtered, and when you click see all slides, not penthouses. What the problem might be?
And how to make the page loading a filter one, but not all of the slides?
Apparently this code should be changed $("#price .price-slider").slick('slickUnfilter');
$(function() {
 $('#price .price-slider').slick({
 slidesToShow: 1,
 slidesToScroll: 1,
 infinite: false,
 arrows: false,
 centerMode: true,
 variableWidth: true,
 arrows: true,
 prevArrow: '.price-prev-arrow',
 nextArrow: '.price-next-arrow',
 lazyLoad: 'progressive',
 responsive: [
{
 breakpoint: 501,
 settings: {
 centerMode: false,
 arrows: false,
 variableWidth: false
}
}
]
});
 $("#price .price-nav__item").on('click', function(){
 var filter = $(this).data('filter');
 $("#price .price-slider").slick('slickUnfilter');

 if(filter == 'one'){
 $("#price .price-slider").slick('slickFilter','.one');
}
 else if(filter == 'two'){
 $("#price .price-slider").slick('slickFilter','.two');
}
 else if(filter == 'three'){
 $("#price .price-slider").slick('slickFilter','.three');
}
 else if(filter == 'four'){
 $("#price .price-slider").slick('slickFilter','.four');
}
 else if(filter == 'penthouse'){
 $("#price .price-slider").slick('slickfilter','.penthouse');
 } 
})
});
April 3rd 20 at 18:24
0 answer

Find more questions by tags Slick