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 ([email protected])