Add a condition to display the pop-up menu.