简介
当今触摸屏设备正统领者移动平台,大多数智能手机和平板都在朝着这个趋势发展,也渐渐地影响到了桌面设备。现在我们已经可以利用现有的浏览器或相关平台所支持触屏事件开发出更好的支持触屏功能的应用或网站了。
开发支持触屏功能的应用的两种主要方式为:本地支持(译者注:如iOS,Android)或Web开发技术(HTML, CSS, Javascript)。事实证明后者已经是可行的了,如,我们可以采用第三方开发工具(如PhoneGap)将由纯Web技术开发的应用编译成各移动平台上可运行的应用。Web技术的一个主要优点在于它的跨平台性。因此,这里我们收集整理了一些关于多点触屏和触屏事件javascript扩展库和插件,同时列出了一些相关的介绍信息,对您在移动应用开发方面或许会有一些帮助。
- QUO JSEvents: Touch, Tap, Double tap, Hold, Fingers, Swipe, Swipe Up, Swipe Right, Swipe Down, Swipe Left, Drag
Other features: Built-in jQuery-like methods. It uses $$ to avoid conflict.
File size: 13KB minified
Standlone: Yes
- Hammer JSEvents: Tap, Double tap, hold, drag, transform (pinch)
Other features: Javascript library focused only for multi-touch gestures
File size: 2KB minified
Standlone: Yes
- TouchyEvents: long press, drag, pinch, rotate, swipe
Other features: jQuery plugin for webkit browsers and browsers that support outch events
File size: ~2.72KB minified
Standlone: No, need jQuery framework
- Mootools-mobileEvents: Swipe, pinch, touch hold
Other features: Touch events are separated into different files.
File size: -
Standlone: No, need MooTools
- jQuery doubletapEvents: Touch, Swipe, Tap, Double tap, Swipe left, Swipe Right, Swipe up, Swipe down
Other features: No android support yet
File size: 4KB
Standlone: No, need jQuery
- jGesturesEvents: Orientation change, Pinch, Rotate, Swipe move, Swipe in multi direction, Swipe with 1,2,3 fingers, Tap with 1,2,3 fingers, pinch open, pinch close, shake in different directions
Other features: Bundled with many gestures and useful events
File size: 16KB minified
Standlone: No, need jQuery
- Touch SwipeEvents: Swipes in 4 directions, 1,2 fingers touch
Other features: Allows swiping and page scrolling
File size: 25KB
Standlone: No, need jQuery
- TouchableEvents: Tap, Long Tap, Double tap, touchable move, touchable end
Other features: Unifies touch and mouse events
File size: 1.96KB
Standlone: No, need jQuery
- thumbs.jsEvents: touch start, touch end, touch end, touch move, mouse down, mouse up, mouse move
Other features: PhoneGap and mobile web friendly
File size: 612 bytes minified
Standlone: Yes
- jQuery.pep.jsEvents: Drag
Other features: Uses CSS3 animations, built-in many drag features
File size: 16KB
Standlone: No, need jQuery
- JetsterEvents: Tap, Double tap, Swipe, Flick, Pinch, Pinch arrow, Pinch widen, Pinch end
Other features: Jester makes recognising gestures on DOM elements really easy
File size: 25KB
Standlone: Yes