Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to fix on mobile ? #19

Open
ryantran opened this issue May 29, 2015 · 9 comments
Open

How to fix on mobile ? #19

ryantran opened this issue May 29, 2015 · 9 comments

Comments

@ryantran
Copy link

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 ?

@sakshamsaxena
Copy link

@ryantran You need to be more specific, and if possible, provide with a snippet.

@JimmyBillan
Copy link

JimmyBillan commented Jun 14, 2016

@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

@grahamd711
Copy link

@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?

@grahamd711
Copy link

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" />

@ConnerKeating
Copy link

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.

@pixxelfactory
Copy link
Owner

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.

@ConnerKeating
Copy link

Thank you, I'll certainly toy around with it as well

@willtate
Copy link

Wondering if anyone ever came up with solutions here?

@akasunil
Copy link

akasunil commented Oct 8, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants