remove document click events when the menu is removed from the DOM