add function to hide close button.