close menu when background is clicked