jQuery Clickout
jQuery plugin for handle outside clicks. It doesn't stop event propagation nor prevents default events.
It extends the jQuery Events and adds a new custom event: clickout
.
You can use it normally with on
and off
methods:
// Add a clickout listener // Remove a clickout listener
The coolest feature is the multiple elements support:
$button
Installation
npm install jquery-clickout --save
Or just copy jquery-clickout.min.js
from this repository, in the dist
folder.
Usage
Just use clickout
like a normal event. Very very easy: