I have some list items and each contains a small box next to it. Upon clicking on the box, some info is shown. I want to hide the box if a click is outside the box. But i do not know exactly how to do it. There are already some posts similar to this question but all of them are using jQuery but I have to get this done using pure JavaScript
I tried to do following way: http://jsfiddle.net/kn8hw4tf/1/
clickevent on entiredocumentbodyand hide the box on click.