F
F
Frostik122021-07-01 08:47:28
JavaScript
Frostik12, 2021-07-01 08:47:28

How to cancel block scrolling in mobile version of swiper slider?

Hello, please tell me how to fix it. The site has a swiper slider installed, I need to remove the slide change with the mouse - this is implemented like simulateTouch: false and everything works, but tell me why it doesn't work on mobile devices?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Brendan Castaneda, 2021-07-01
@Frostik12

simulateTouch only accepts mouse events.
I think you should try the following, it might help you:
Disable/enable the ability to move the slider by grabbing it with the mouse or touching it with your finger (on touch screens) by setting this property to false/true
swiper.allowTouchMove: true
If false then only the way to switch the slide is to use external API functions like slidePrev or slideNext.
allowTouchMove: false,
Enable/disable scrolling of elements matching the class specified in noSwipingClass
noSwiping: true,
Specify the element's css class noSwiping
noSwipingClass: ' swiper-no-swiping '
When enabled, it does not allow slides to be changed by swiping or navigation/pagination buttons during a transition.
preventInteractionOnTransition: true

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question