Socket
Socket
Sign inDemoInstall

vanilla-touchwipe

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vanilla-touchwipe

Tiny <100LOC library to detect touch swipe gestures


Version published
Weekly downloads
36
decreased by-26.53%
Maintainers
1
Install size
10.1 kB
Created
Weekly downloads
 

Readme

Source

vanilla-touchwipe Build Status NPM version

This is a vanilla js port of the touchwipe jQuery plgin, (originally written by Andreas Waltl), which is used to detect touch swipe gestures.

Features

  • Tiny footprint: < 100 LOC
  • Easy to use

Usage

var domNode = document.getElementById('container');

var touch = touchwipe(domNode, {
  wipeLeft: function() { alert('left'); },
  wipeRight: function() { alert('right'); },
  wipeUp: function() { alert('up'); },
  wipeDown: function() { alert('down'); },
  min_move_x: 20,
  min_move_y: 20,
  preventDefaultEvents: true
});

touch.unbind();

License

MIT

Keywords

FAQs

Last updated on 21 Oct 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc