项目作者: tgxpuisb

项目描述 :
a gesture library for mobile phone
高级语言: JavaScript
项目地址: git://github.com/tgxpuisb/gesture.git
创建时间: 2017-02-22T16:14:26Z
项目社区:https://github.com/tgxpuisb/gesture

开源协议:MIT License

下载


gesture

使用方式

  1. const Gestrue = require('Gestrue')
  2. new Gestrue('.container') //监听第一个出现的container容器,默认是body,如果container是类名或者标签则选择第一个
  3. // 然后在此元素下,或者当前元素上面触发的手势事件都会被监听
  4. document.querySelector('.child').addEventListener('pan', function(){
  5. console.log('paning...')
  6. })
  7. // or
  8. $('.child').on('pan', function(){
  9. console.log('paning...')
  10. })