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
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742258032a4410380.html
评论列表(0条)