Trying to work out how to close a dialog and return to the calling page (where the page is a div within a multipage template).
The dialog defaults to the first page div (back button) or # (x button) - I need it to close and remain on the referring page/div.
Tried this:
$('#dialog').live('pagehide', function (e) {
$.mobile.changePage("#full-map");
});
but I still get a flick back to #index before transitioning to #full-map. Is there any where I can intercept the close function itself?
I trigger the dialog like so, on clicking a Google map marker:
google.maps.event.addListener(marker, 'click', function () {
$.mobile.changePage("#dialog", {
transition: "pop",
reverse: false,
changeHash: false,
});
});