OuterClick will fire the events when you click outside of the element.
for client-side library.
npm install outerclick
<script src="node_modules/outerclick/dist/outerclick.js"></script>
var outerclick = require('outerclick');
outerclick.addListener('.target', function(e) {
console.log('outer clicked!', e);
});
this library depends on matches() method.
http://caniuse.com/#feat=matchesselector
MIT