Answer the question
In order to leave comments, you need to log in
2 questions about slick-slider tabs?
penthhouse for some reason is not filtered and when clicked, all slides appear, not penthouses. What could be the problem?
And how to make the page load by the one filter, and not by all the slides?
Looks like this code needs to 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');
}
})
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question