jquery-ui-dialog - How to hook into dialog close event
问题 I am using the jquery-ui-dialog plugin I am looking for way to refresh the page when in some circumstances when the dialog is closed. Is there a way to capture a close event from the dialog? I know I can run code when the close button is clicked but that doesn't cover the user closing with escape or the x in the top right corner. 回答1: I have found it! You can catch the close event using the following code: $('div#popup_content').on('dialogclose', function(event) { alert('closed'); });