neha4no
8/8/2018 - 10:09 AM

Flickity-prev-next-button doesn't fire event for first element #598

I have navigation carousel below the main carousel. The two carousels are linked using as asNavFor.

According to the documentation I notice the default behaviour of the arrow buttons on the navigation carousel are to slide the navigation carousel left or right - useful for when the width/number of thumbnails exceeds the container width.

What I want to do is that when a user clicks these navigation arrows it will select the prev/next image. As you can see in the GIF this is working fine, but not for the first or last thumbnails. I beleive this is due to the 'disable' attribute being added to these buttons.

https://github.com/metafizzy/flickity/issues/598

Sounds there is a bit of confusion in how the previous/next arrows work for a navigation carousel. The previous/next buttons allow a user to navigate cells in that carousel. So you could swipe to the far left or far right, and it wouldn't change the main carousel. The main carousel would only change when you clicked on a navigation cell.

To enable your desired behavior, you'll have to implement your own custom buttons. See demo https://codepen.io/desandro/pen/291975a383c8bce86d733dbcb2435a07