I have this responsive navigation which goes into a dropdown menu when the screen size is too small.
However, the trigger of the navigation that opens the navigation gets left behind the navigation.
Okay, easily fixed with z-index
.
But many people might not realize that they have to press the small button to close it (especially on mobile), so I’d like it to close when user clicks anywhere else than the navigation.
http://jsfiddle.net/anhagdjt/
(CodePen didn’t seem to like jQuery?)
Could you help me out, I’m a total noob in JS?