metafizzy / flickity

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

Stop autoplay after the second slide is played #850

Closed tomasdrvota closed 6 years ago

tomasdrvota commented 6 years ago

Hello, I am using Flatsome theme, which uses Flickity slider. I need my slider to stop autoplay after the second image is showed. The slider has just two slides. I need them to autoplay but not to repeat.

I found some old case, but it doesn´t work for me. You can find my solution in the attachment and in the case study. Case study: https://codepen.io/tomasdrvota/pen/PyprJB

URL of the website is www.flatwebs.cz

Thank you for your answers.

fw1 fw2 fw3

desandro commented 6 years ago

Here's that demo working just fine: https://codepen.io/desandro/pen/ReZVom. Be sure to remove HTML initialization and just use jQuery.

tomasdrvota commented 6 years ago

Hello, I still get $(...).flickity is not a function. Where could be the problem?