collapse menu on click outside of element