Reputation: 295
I want to be able to navigate from the purchase popup to the edit popup, but when I click on "Edit", it doesn't bring out the edit popup, it just closes the purchase popup.
<div data-role="popup" id="purchase" data-theme="a" data-overlay-theme="c">
<div data-role="popup" id="edit" data-theme="a" data-overlay-theme="c">
How can I do this?
Upvotes: 1
Views: 43
Reputation: 295
Omar (https://stackoverflow.com/users/1771795/omar) came up with this, which works well.
$(document).on("pagecreate", function (e) {
$(".edit", e.target).on("click", function () {
$("#purchase", e.target)
.one("popupafterclose", function () {
$("#edit", e.target)
.popup({
transition: "pop"
})
.popup("open");
})
.popup("close");
});
});
Upvotes: 1