0.3.0 • Published 10 years ago

frontools-event-swipe v0.3.0

Weekly downloads
4
License
CC-BY-SA-4.0
Repository
github
Last release
10 years ago
·▄▄▄▄▄▄         ▐ ▄ ▄▄▄▄▄            ▄▄▌  .▄▄ ·
▐▄▄·▀▄ █·▪     •█▌▐█•██  ▪     ▪     ██•  ▐█ ▀.
██▪ ▐▀▀▄  ▄█▀▄ ▐█▐▐▌ ▐█.▪ ▄█▀▄  ▄█▀▄ ██▪  ▄▀▀▀█▄
██▌.▐█•█▌▐█▌.▐▌██▐█▌ ▐█▌·▐█▌.▐▌▐█▌.▐▌▐█▌▐▌▐█▄▪▐█
▀▀▀ .▀  ▀ ▀█▄▀▪▀▀ █▪ ▀▀▀  ▀█▄▀▪ ▀█▄▀▪.▀▀▀  ▀▀▀▀
     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.

0.3.0

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago