Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How refresh Flickity plugin?

I have a problem with Flickity plugin. I want to use this one mixed with svgLoader plugin. The slider animation does't work correctly because you need to resize the window for refresh flickity plugin. You can try it here : http://thibaut-lalanne.com/ Thx

like image 966
Thibaut Avatar asked Nov 16 '25 00:11

Thibaut


1 Answers

Resize the carousel and re-position cells like so:

// jQuery
var $carousel = $('.carousel').flickity()
$carousel.flickity('resize')

// vanilla JS
var flkty = new Flickity('.carousel');
flkty.resize()

For examples see: https://flickity.metafizzy.co/api.html#resize

like image 183
Julix Avatar answered Nov 17 '25 22:11

Julix



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!