Disable scrolling of the page along the Y-axis on the iPad / iPhone / Android?

Hello. The problem is this, how to disable scrolling of the page along the Y-axis at the time when the user moves the slider the event "swiperight" and "swipeleft"?
And if you scroll not under the direct Kut it turns out that time and the page to scroll.

I tried to use $('body').on('touchstart', false); but not much came up. Does not work when you first scrole and in the end the first time the page skalitsa.

Thank you.
July 2nd 19 at 13:35
2 answers
July 2nd 19 at 13:37
Solution found, but with the help of this plugin hammerjs.github.io
July 2nd 19 at 13:39
$('your_slider_slector').on('touchmove', function(event) { event.preventDefault(); });
Not quite the same, already tried it. - Robin.Walter39 commented on July 2nd 19 at 13:42

Find more questions by tags jQueryJavaScriptHTMLCSS