Close popup div when clicked outside
I have a popup div that shows only when clicked on particular button. It even hides when clicked on the same button. My problem is, i also want to hide div when clicked anywhere outside.
In fact, if i click on my screen, outside the popup, it will hide. But if i touch the screen and scroll it down or up the popup still there !