i have a probem with my app:
i have an app with several pages and a navbar menu to navigate among pages. For one of these pages ("gallery") i followed the "Adding Photoswipe Image Gallery To Your App" tutorial. when i tested my app on the browser the first time i navigate to the page gallery everything goes right but if i move to another page and then back to the page gallery i just get the loading spinner running.
from the console i get the error message Uncaught Code.PhotoSwipe.createInstance: Instance with id "gallery already exists."
the JS i used on the page gallery load event is:
codevar photoSwipeInstance = Appery("gallery").find("ul.gallery a").photoSwipe({}, "gallery");/code
while the html i used is
codeul class="gallery">
Code: Select all
<li><a href="http://www.photoswipe.com/latest/examples/images/full/001.jpg"><img alt="Image 001" src="http://www.photoswipe.com/latest/examples/images/thumb/001.jpg" /></a></li>
<li><a href="http://www.photoswipe.com/latest/examples/images/full/002.jpg"><img alt="Image 002" src="http://www.photoswipe.com/latest/examples/images/thumb/002.jpg" /></a></li>
<li><a href="http://www.photoswipe.com/latest/examples/images/full/003.jpg"><img alt="Image 003" src="http://www.photoswipe.com/latest/examples/images/thumb/003.jpg" /></a></li>
<li><a href="http://www.photoswipe.com/latest/examples/images/full/004.jpg"><img alt="Image 004" src="http://www.photoswipe.com/latest/examples/images/thumb/004.jpg" /></a></li> </ul>/code