metafizzy / flickity

:leaves: Touch, responsive, flickable carousels
https://flickity.metafizzy.co
7.52k stars 605 forks source link

Flickity v3 .destroy() is removing cell class names so it cant reinit #1234

Closed gregg-cbs closed 1 year ago

gregg-cbs commented 2 years ago

When destroying flickity it then removes all the cell class names. So when trying to reinit it, flickity does not work.

Here is the repoduction: https://codesandbox.io/s/flickity-destroy-and-init-edkcew?file=/index.html

desandro commented 1 year ago

Thanks for this. flickity-cell is added and removed by Flickity. You should not flickity-cell to your own markup. So, I recommend you use a different selector like carousel-cell.