xPosition of the menu and closing on click outside the menu