I want to make a popup that should appear once a button is clicked and disappear once the user clicks outside of the box.
I\'m not sure how to make the div disappear
el.onmouseleave = function(){ document.body.onclick = function(){ el.style.display = 'none'; document.body.onclick = null; } }