add close button event