Reputation: 739
I have the next code:
> <div class="scroller" style="width: 100%; height: 300px; overflow:
> auto; overflow-y: hidden;">
> <div class="content" style="height: 100%; width: 2500px;">
> <div id="vScrollDiv" style="width: 500px; height: 100%; overflow: auto; color: #fff; display: inline-block">
> Content that makes div overflow verticaly
> </div>
> <div style="width: 1900px; height: 100%; color: #000; display: inline-block">
> Content that makes "scroller" div overflow horizontaly
> </div>
> </div>
How can I scroll horizontally the content div when my finger is over the div that scrolls only vertically and I gesture like I want to scroll horizontally?
Upvotes: 0
Views: 492
Reputation: 739
I was able to catch the touch events and scroll the right divs by identifying "clicked" div and calculating the trajectory of the drag. More infos about the touch events: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html Scrolling made with: http://demos.flesler.com/jquery/scrollTo/
Upvotes: 2
Reputation: 3711
if i interpret your question right... you want to simulate the mousewheel with horizontally scroll. Thats not a feature of ipad i guess. if you move your fingers to scroll into a direction it will do that if possible... but as you overflow is hidden it will ignore it. i think this is not possible with some web-code. did i undestand that question right?
Upvotes: 0