Prolems with photoswipe: [Uncaught Code.PhotoSwipe.createInstance: Instance with id "gallery already exists."]
hello again.
i tried the solutions you proposed (with rendering all pages and not) and both solutions works fine.
then i tried to build a page to show the first image of each gallery (the page is named ("menuGallery") and on click on Image navigate to page with corresponding gallery. and this solution works.
my problem is that i added also a js to open photoswipe directly in flull screen mode after the click on the images clicked in the "menuGallery page and I would like to navigate to the menuGallery page after clicking on the photoswipe close button.
the JS i added to open photoswipe in full screen mode is:
codephotoSwipeInstance = Appery("gallery").find("ul.gallery a").photoSwipe({
jQueryMobile: true,
loop: false,
enableMouseWheel: false,
enableKeyboard: false,
captionAndToolbarAutoHideDelay: 0
}, "gallery");
photoSwipeInstance.show(0); /code
this code is working fine too.
the code i added to navigate to the menuGallery page after clicking on the photoswipe close button is
codephotoSwipeInstance.addEventHandler("PhotoSwipeOnHide", function(e){
Appery.navigateTo('menuGallery',{transition: 'slide',reverse: true});
});/code
but when i test this code on my desktop browser ("chrome") this solution works, while if i test the app on my mobile, when i click on the photoswipe close button, the app navigate firstly to the "menuGallery" page, but then the app automatically navigates to the photoswipe full screen mode page again.