1.1.4 • Published 8 years ago

off-click v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

off-click

Detects clicks that exist outside of a given element.

Installation

npm install off-click --save

Next you can import the library.

//in your app.js or similar file
import offClick from 'off-click';

Alternatively you can link to the library directly:

<script src="./node_modules/off-click/src/off-click.js"></script>

Usage

Here's a simple example.

<div id="demo">
  Demo Element
</div>

<script>
var elem = document.getElementById('demo');

offClick(elem, function() {
  console.log('Clicked off the element!');
})
</script>
1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.0

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago