added onclick function to menu close after clicking submenu