phucbm / flickity-responsive

💻📱Responsive option for Flickity.
https://flickity.netlify.app
MIT License
9 stars 1 forks source link

Default Flickity option turning on when we manually "resize" #24

Open scheylon opened 1 year ago

scheylon commented 1 year ago

I have a button on my website which trigger the height of the carrousel, and for it to work properly, it refresh the carrousel through "resize" but sadly, when it force refresh, the default Flickity option are back (arrow, pagedot, draggable).

var $carousel = $('.carousel').flickity();

$('.button').on('click', function () {
    $carousel.toggleClass('is-expanded')
    setTimeout(function () {
        $carousel.flickityResponsive('resize');
    }, 600);
    $('.caption').toggleClass('hidden');
});
phucbm commented 1 year ago

Hi @scheylon, Could you reproduce the issue in a CodePen, please?