A jQuery plugin provides clickout event.
You can also install jquery-clickout by using Bower.
bower install jquery-clickout
You could just use jQuery bind
or on
to listen event.
JavaScript
element.bind('clickout', clickoutHandler);
element.clickout(clickoutHandler);
The project is released under the MIT license.
The project's website is located at https://github.com/emn178/jquery-clickout
Author: Chen, Yi-Cyuan (emn178@gmail.com)