webapp开发插件

来源:互联网 发布:淘宝怎么批量修改详情 编辑:程序博客网 时间:2024/05/16 09:01

整理平时用到的或者看到的一些适用移动web开发的js插件,长期更新。

1、touch.js

官方网站:http://touch.code.baidu.com/

简介:

Touch.js是移动设备上的手势识别与事件库, 由百度云Clouda团队维护,也是在百度内部广泛使用的开发工具.

Touch.js手势库专为移动设备设计, 请在Webkit内核浏览器中使用.

主要功能/方法:

  • Rotate
  • Scale
  • Tap & Hold
  • Swipe
  • Drag
  • Touch

使用方法:

touch.on('#target', 'rotate', function(ev){    //your code});


2、jquery.wipetouch.js

官方网站:http://wipetouch.codeplex.com/

简介:

基于jQuery的触摸插件,用户可在9个方向滑动触发事件

wipeLeft、wipeRight、wipeUp、wipeDown、wipeUpLeft、wipeDownLeft、wipeUpRight、wipeDownRight、wipeMove

支持jQuery版本1.4及以上。

使用方法:

$(document).wipetouch({  tapToClick: true, // if user taps the screen, triggers a click event  wipeLeft: function(result) {     // do something when user wipes to the left   },  wipeRight: function(result) {     // do something when user wipes to the right     },
  wipeUp: function(result) {     // do something when user wipes to the up  },  wipeDown: function(result) {     // do something when user wipes to the down     }
 });

0 0
原创粉丝点击