2š
Omar helped me find solutions.
- He had me set data-history=āfalseā as an attribute in the ādiv data-role=āpageāā and move the popup scripts inside that div.
- Apparently the URL was only changing in mobile Chrome on iPhone, not in Safari, and it was not a problem because it resolves to the intended URL.
- I learned how to set the /help_me_decide page (āfourā) to load via http instead of AJAX by adding ārel=externalā to the anchor for it on the /choose_category page.
Because the popups were flashing and the images on the /help_me_decide page werenāt loading, we set up a popup script on pagecontainershow with a Timeout like this:
$(document).on("pagecontainershow", function () {
var activePage = $.mobile.pageContainer.pagecontainer("getActivePage");
if (activePage[0].id == "four") {
setTimeout(function () {
$("#popupDecideOMatic").popup().popup("open");
}, 50);
$(".slider", activePage).slick();
}
});
But it turned out that the slider was actually already being initialized, so we took out ā$(ā.sliderā, activePage).slick();ā and the images appeared (not sure why they didnāt in the first place).
Similar code was used for the /choose_category page:
$(document).on("pagecontainershow", function () {
var activePage = $.mobile.pageContainer.pagecontainer("getActivePage");
if (activePage[0].id == "one") {
setTimeout(function () {
$("#popupWelcome").popup("open");
}, 50);
}
});
š¤Michelle Glauser
Source:stackexchange.com