npm

Check out our latest tech talk, "JavaScript Supply Chain Security" presented by VP of Security, Adam Baldwin.Watch it here »

click-and-hold

1.0.1 • Public • Published

Click And Hold

Will fire a handler throttled by an interval, continuously while user presses on element.

Supports touch.

How to use:

Important to note: If your handler relies on scope, ensure it is called with the correct scope by binding the scope directly, or using the closure.

var clickAndHold = require('click-and-hold');
 
clickAndHold.register(element, handler.bind(theScopeYouWant), interval);
 
clickAndHold.unregister(element);

Install:

npm install --save-dev click-and-hold

I am not trying to camp names on NPM, so if someone else wants this name just let me know and I will gladly take my repo down.

Keywords

none

install

npm i click-and-hold

Downloadsweekly downloads

12

version

1.0.1

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability