swiper

Open full view…

Detect swiper move direction after reached the end of swiper

fredericofigueira
Thu, 22 Jun 2017 13:46:54 GMT

I need to detect for what direction user has moved swiper on “onSlideMove” event. I have a page with multiple swipers, when I reach the end of one I need to hide current and display the next if user swipe right, and if user swipe for left I need to hide current and display the back swiper. There are multiple swiper, with multiple slides, when I reach the end of some, I need to display the next swiper. It's my problem Anyone have some idea?

eurotrash
Thu, 24 Aug 2017 04:11:58 GMT

This site is built with 2 swipers a vertical and a horizontal swiper. Clicking on the right loads a horizontal swiper. http://www.skolkindesign.com/ Review the code starting around line 285 for ideas on how to manage state using callbacks for two different swipers "myHorizontalSwiper" http://skolkin.dev/wp-content/themes/skolkin/js/main.js Pretty hacky code overall but it works.