I needed to trap the events triggered when a dialog is opened and closed in a jQuery Mobile app. After trying all sorts of combinations of open, close, and dialog events, I found that these will do the trick:
// Dialog opened
$('#myDialog').on("pageshow", function() {
alert("Opened");
});
// Dialog closed
$('#myDialog').on("pagehide", function() {
alert("Closed");
});
Leave a Reply