Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

An Ender module for handling swipe gestures on mobile devices

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 ender.js
Octocat-spinner-32 ender.poke.js
Octocat-spinner-32 example.html
Octocat-spinner-32 package.json
Octocat-spinner-32 readme.md
readme.md

Ender Poke

A tiny (about 600 bytes minified) Ender module for handling swipe gestures on mobile devices. Currently, the four cardinal directions are supported. To use it, add it to your Ender build (see below for help on that) and do something like this:

$('#someElement').poke({
    'N-S': function() {
        //do stuff on "north, then south" swipe
    },
    'W': function() {
        //do stuff on "west" swipe
    },
    'S-E-N': function() {
        //do stuff on "south, east, then north" swipe
    }
});

Ender

Poke is an NPM package that requires Ender. If you're not already using Ender, you're missing out; get it now:

$ npm install ender -g

If you're new to Ender, this will get you going:

$ ender build ender-poke

If you're already running Ender, just add it:

$ ender add ender-poke
Something went wrong with that request. Please try again.