I have found it!
You can catch the close event using the following code:
$('div#popup_content').on('dialogclose', function(event) {
alert('closed');
});
Obviously I can replace the alert with whatever I need to do.
Edit: As of Jquery 1.7, the bind() has become on()
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…