admin管理员组文章数量:1328388
I'm making an offline version of an online products catalogue for the Ipad. It will be written in HTML5 / JS and utilise offline image caching and localstorage.
I want to be able to introduce the same UI interactions as e with the Ipad in terms of swiping. So if the user swipes from right to left, it will load the next product. If they swipe from left to right, it will load the previous image.
How do I capture this with Javascript ?
I'm making an offline version of an online products catalogue for the Ipad. It will be written in HTML5 / JS and utilise offline image caching and localstorage.
I want to be able to introduce the same UI interactions as e with the Ipad in terms of swiping. So if the user swipes from right to left, it will load the next product. If they swipe from left to right, it will load the previous image.
How do I capture this with Javascript ?
Share Improve this question asked Nov 21, 2011 at 7:36 32423hjh3242332423hjh32423 3,0887 gold badges46 silver badges62 bronze badges1 Answer
Reset to default 5You can have a look at the events supported by mobile Safari here: http://developer.apple./library/IOs/#documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
touchstart
, touchmove
and touchend
events in particular
Or, if you don't want to reinvent the wheel, you can have a look at these scripts: http://cubiq/swipeview
http://plugins.jquery./project/swipe
本文标签: javascriptCapture the swipe effect to navigate to next page in HTML5 Ipad AppStack Overflow
版权声明:本文标题:javascript - Capture the swipe effect to navigate to next page in HTML5 Ipad App - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742258031a2441987.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论