문제

I'm trying to create a carousel of items, that can be filtered.

I've been trying to use MixItUp and Slick together to accomplish this. But they aren't playing well together. MixItUp hides the items, but Slick seems to unhide them almost immediately. Is there any other library that would work better with Slick for this purpose, or even bxSlider?

$(document).ready(function(){

    $('.one-time').slick({
    dots: false,
    infinite: true,
    speed: 100,
    slidesToShow: 3,
    slidesToScroll: 1
  });

$('#product_carousel').mixItUp();

$('#product_carousel').on('mixEnd', function(e, state){

   $('.one-time').slick();
});


});
도움이 되었습니까?

해결책

Check the latest version of Slick. I saw this and decided to add a filter method. You can use it like:

$('#yourSlider').slickFilter(':even');

and use unfilter to return to the original state:

$('#yourSlider').slickUnfilter();

It accepts jQuery filter syntax, so selectors and comparators both work.

Enjoy!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top