Adding in events for when the popover is displayed.