javascript - Capture the swipe effect to navigate to next page in HTML5 Ipad App - Stack Overflow

I'm making an offline version of an online products catalogue for the Ipad. It will be written in

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 badges
Add a ment  | 

1 Answer 1

Reset to default 5

You 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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742258032a4410380.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信