Picard102
Picard102

Reputation: 644

Carousel Slider with Filtering

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();
});


});

Upvotes: 0

Views: 3697

Answers (1)

Ken Wheeler
Ken Wheeler

Reputation: 1958

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!

Upvotes: 1

Related Questions