The correct text pops up on the slides, but when I press filter the entire carousel dissapears and no errors are in the console
var slides = document.getElementsByClassName("red");
if (slides != null) {
$(sliderClass).slick('slickUnfilter');
$(sliderClass).slick('slickFilter', slides);
}
Carousel markup
<div class="carousel">
<div class="red"></div>
<div class="red"></div>
<div class="blue"></div>
</div>
So this is the answer
$(sliderClass).slick('slickFilter', $('.red').parent().parent());