0.0.5 • Published 4 years ago

touchils v0.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Touchils - H5 Touch Utils

NPM version

Aim to provide workaround event listeners for touch devices(such as 'long press' event), since some mobile browsers do not fully response to 'click' or 'contextmenu' events expectedly.

Events List

  • longPress

    Pressing the touch screen and hold for spectific time(customizable). Event will not be triggered if the gesture moved or touchMove is fired during pressing.

  • more to be implemented... 🤣

Install

yarn add touchils

npm install touchils -S

Usage

(ES Module import only)

Add Event Listener

import { LongPress } from 'touchils';

const longPressEvt = new LongPress(document.getElementByID('test'), (e) => {
  alert('long press');
}));

Remove Event Listener

longPressEvt.remove();
0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago