UI code, which I've rewritten into a single function that can be used out of the box.
Try it: Show DIV
event on any element with just one line:
are elements outside the target that must not trigger the click-out event when clicked. You must include buttons and links that toggle the display of the target element, or else the click-out event will be triggered, preventing their normal function.
Here's the full code that you can copy-paste. You can also download it as a JS file
Download JS File
Published on March 13, 2019