Answer the question
In order to leave comments, you need to log in
The slider interferes with scrolling on the mobile. devices - how to fix it?
Greetings.
On a mobile device, the vertical scroll above the slider does not work. At some resolutions, the slider takes up the entire viewport, so it is impossible to scroll the page. The slider itself only responds to horizontal swipe.
Who faced, how did you solve the problem?
Answer the question
In order to leave comments, you need to log in
Similar situation. The problem is on this page: https://www.rexalix.host/RSM/
At the end of index.html there is a block nav id="nav" class="nav" inside which there are several
css anchors simple, there is nothing that could undo vertical text scroll on touch gadgets, and here is the script:
$(function() {
$(".container").swipe( {
swipe:function(event, direction, distance, duration, fingerCount, fingerData) {
if("right" === direction) {
$("#nav").addClass("is-open");
} else if("left" === direction) {
$("#nav").removeClass("is-open ");
}
},
});
The script did not assign anything to vertical gestures, and vertical scrolling on the page still became unavailable on touchscreen gadgets. I'm still looking for a solution
• found a solution •
$(".container").swipe( {
swipeLeft:leftSwipe,
swipeRight:rightSwipe,
threshold:3
});
function leftSwipe(event){
$("#nav").removeClass("is-open");
}
function rightSwipe(event){
$("#nav").addClass("is-open");
}
now the script works only with horizontal gestures, without interfering with the vertical scrolling of the page
PS included the jquery.touchSwipe.min.js library
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question