added swipe events for hiding the menus