kenwheeler / slick

the last carousel you'll ever need
kenwheeler.github.io/slick
MIT License
28.33k stars 5.88k forks source link

Filtering/hiding slides #4191

Open BuzzGraphicDesign opened 2 years ago

BuzzGraphicDesign commented 2 years ago

Hi.

I created a custom filtering, which hides certain slides on user click.

The problem is, after i hide any slide(s) the carousel becomes kinda broken and can't scroll through.(likely because the slick width was calculated for all the items)

Is there a proper way to hide slides and keep the carousel working???

Tried to 'refresh' the carousel after i hide the elements, but it brings back all the elements so it's not good.

Or is there a way to create a new Carousel through jQuery, build up the HTML and initialise through jQuery?

ahmadalfy commented 2 years ago

@BuzzGraphicDesign can you provide an reproducible example?