admin管理员组文章数量:1289390
I would like to learn how to make image galleries and content sliders that can support both touch and mouse events. What's a good place to start learning about touch events?
I can't seem to find any official documentation.
Are there helpful touch libraries supported through jQuery that normalize the api?
I would like to learn how to make image galleries and content sliders that can support both touch and mouse events. What's a good place to start learning about touch events?
I can't seem to find any official documentation.
Are there helpful touch libraries supported through jQuery that normalize the api?
Share Improve this question asked Dec 30, 2011 at 13:59 Amit ErandoleAmit Erandole 12.3k23 gold badges70 silver badges103 bronze badges 1- 1 It's worth looking here to see how well touch events are supported in mobile browsers: quirksmode/webkit.html – Kevin Commented Dec 30, 2011 at 14:06
5 Answers
Reset to default 3There is a good Apple documentation on touch events (but not only):
list of supported events on Safari Web Content Guide: Handling Events
You can also visit this page (JS script created by me) on your touch-enabled device and see what events are being triggered:
http://jsfiddle/wzD8A/embedded/result/
I believe different devices may fire different events. For example my own tablet-convertible PC does not fire touch events, when I click the screen, and Android may behave differently than eg. iPhone. I do not know any source of prehensive information about the differences in this matter.
I've noticed that you don't want to use a mobile framework for some reason.
If you don't want to use a mobile framework, which is highly remended, you can go straight to the native API, of course. But be aware that you might find vendor specific differences that are already handled by the mobile frameworks and might be hard to deal with.
Here's a fairly good tutorial on how to do touch and mobile optimizations based solely on native APIs:
http://www.html5rocks./en/mobile/touch.html
You'll need to get familiar with jquery mobile touch events, I am sure there is lots of resources on it but here is one that I found useful
http://jquerymobile./test/docs/api/events.html
If you're simply interested in learning about touch events, iTunes has the Apple Developer Conference Videos from the 2010 and 2011 conferences available for free. It requires registration, but again the registration is free.
I used the information here to create a mobile-friendly version of an application and it worked fine on iOS and Android. (Blackberry didn't have a browser that supported touch events at that time.)
This will give you an overview of how to use touch events and gestures in your web apps. Watch the "Adding Touch and Gesture Detection to Web Pages on iPhone OS" from the 2010 conference as well as the "Hidden Gems for Web Apps" and "Understanding Layout and Gestures in Safari on iOS and Lion" presentations from the 2011 conference.
Hope this helps.
There are some JavaScript Touch Libraries such the following:
- Sencha Touch (mercial or open source license)
- jQTouch (free)
- jQuery Mobile (free)
本文标签: jqueryCan anyone suggest a place to start with javascript touch events for the webStack Overflow
版权声明:本文标题:jquery - Can anyone suggest a place to start with javascript touch events for the web? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741449778a2379419.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论