jInvertScroll
jInvertScroll copied to clipboard
How to fix on mobile ?
I really love this jquery plugin and i used it for my website. But, when i test on mobile, it is wrong way up. When i swipe down, it scrolls up => screen scroll left. Beside, if when swipe right, can it scroll right ?
@ryantran You need to be more specific, and if possible, provide with a snippet.
@ryantran Don't forget to set the viewport on mobile <meta name="viewport" content="width=device-width, user-scalable=no">
otherwise the body tag will be bigger than you screen
@pixxelfactory @JimmyBillan, is it possible to disable the scroll down and implement a swipe right type functionality? This way the user could swipe left or right instead of having to scroll down?
I tried what @JimmyBillan suggested to set the viewport on mobile and also the below meta tag. I still am able to scroll horizontally however.
<meta name="viewport" content="width=device-width; initial-scale = 1.0; maximum-scale=1.0; user-scalable=no" />
Trying to implement invertscroll, but I'm running into this issue. Since it utilizes an up-and-down scroll to go sideways, it does the same on mobile. On mobile you have to swipe up and down to go left and right. Is it possible to fix this.
Hmmm.. one possibility would be to implement a routine that detects if the user is on a mobile device (or differ between click and touchstart when scrolling) and write a function or whatever that does not set the full height, but the width and update the positions of the elements when scrolling to left / right.. Not a simple thing to do, but i'll look into that.
Thank you, I'll certainly toy around with it as well
Wondering if anyone ever came up with solutions here?
there is an error in the jquery file
// do the position calculation for each element
$.each(elements, function (i, el) { var pos = Math.floor((el.width - winWidth) * scrollPercent) * -1; el.el.css('left', pos); });
here scrollPercent should be increased more than 1.