[ GitHub ]
Delete class "is-active" if click outside element
Test box
Text box 2
Layout:
<div class="js-clickout"></div>
Javascript:
var clickout = new clickOut.default({
className: '.js-clickout', // class name where outside click
activeClass: 'is-active', // class name for delete
after: function(elements) {} // after click
});