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