JS: Hide an element when clicking on somewhere else

Hint: I used the functions removeClass() and addClass() to make things easier. You can find them on

See the Pen Hide an element when clicking on somewhere else by Lars Gerrit Kliesing LGK (@lgkonline) on CodePen.