frontools-event-swipe

Swipe Events Emitter


Keywords
frontools, javascript, swipe, event, emitter
License
CC-BY-SA-4.0
Install
npm install frontools-event-swipe@0.3.0

Documentation

DEPRECATED, use frontools instead

Β·β–„β–„β–„β–„β–„β–„         ▐ β–„ β–„β–„β–„β–„β–„            β–„β–„β–Œ  .β–„β–„ Β·
▐▄▄·▀▄ β–ˆΒ·β–ͺ     β€’β–ˆβ–Œβ–β–ˆβ€’β–ˆβ–ˆ  β–ͺ     β–ͺ     β–ˆβ–ˆβ€’  β–β–ˆ β–€.
β–ˆβ–ˆβ–ͺ ▐▀▀▄  β–„β–ˆβ–€β–„ β–β–ˆβ–β–β–Œ β–β–ˆ.β–ͺ β–„β–ˆβ–€β–„  β–„β–ˆβ–€β–„ β–ˆβ–ˆβ–ͺ  β–„β–€β–€β–€β–ˆβ–„
β–ˆβ–ˆβ–Œ.β–β–ˆβ€’β–ˆβ–Œβ–β–ˆβ–Œ.β–β–Œβ–ˆβ–ˆβ–β–ˆβ–Œ β–β–ˆβ–ŒΒ·β–β–ˆβ–Œ.β–β–Œβ–β–ˆβ–Œ.β–β–Œβ–β–ˆβ–Œβ–β–Œβ–β–ˆβ–„β–ͺβ–β–ˆ
β–€β–€β–€ .β–€  β–€ β–€β–ˆβ–„β–€β–ͺβ–€β–€ β–ˆβ–ͺ β–€β–€β–€  β–€β–ˆβ–„β–€β–ͺ β–€β–ˆβ–„β–€β–ͺ.β–€β–€β–€  β–€β–€β–€β–€
     The front-end designer's low-level toolbox

About Frontools

Frontools is a bundle of tools for front-end designers who want to have a low level development workflow. No bullshit, it's easy to learn.

It supports only modern browsers

This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.

Swipe Events

event-swipe is written using ECMAScript 2015 and is a NPM module. Whereas it can be used independently, it has been done to work with Frontools

Installation

npm install frontools-event-swipe --save-dev

If you want it to be transpiled into ECMAScript 5.x, use Babelify with the es2015 preset. See package.json for more information.

Dependencies

Usage

<html>
<body>
    <div id="aContainer"></div>
</body>
</html>
import SwipeEvent from "frontools-event-swipe";

// Attach the Event to the Document...
var swipe = new SwipeEvent();
// ...or to one HTMLElement
var swipe = new SwipeEvent( document.getElementById( "aContainer" ) );

// Attach the event when you need it
swipe.attach();

// SwipeEvent.event is an EventEmitter from eventemitter3
swipe.event.on( "right", function show_previous () {}, null );
swipe.event.on( "left" , function show_next () {}, null );

// Detach the event when you need it
swipe.detach();

Contribute

There are many ways to contribute to Frontools.