All Projects → BosNaufal → click-outside-js

BosNaufal / click-outside-js

Licence: MIT license
Standalone javascript library to make click outside event. https://bosnaufal.github.io/click-outside-js/

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Click Outside JS

Standalone javascript library to make click outside event. You can use it anywhere even with other JS library~ It Just works!

DEMO

Install

Include click-outside.js to your web page.

or

You can install it via NPM

npm install click-outside-js

Usage

// Define the element
var el = document.getElementById('target');

// Make New Click Outside Event
var myEvent = new onClickOutside(el, function() {
  console.log("You've Just Clicked Outside The Box!");
})

// Other Methods
// myEvent.remove() // To Remove Event Listener
// myEvent.reinit() // To Reinit Event Listener

Thank You for Making this useful~

Let's talk about some projects

Just Contact Me At:

License

MIT Copyright (c) 2016 - forever Naufal Rabbani

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].