I am using photoswipe in my mobile application.
We are showing the images in a target div
, we are not using the full screen view.
A requirement came in to not have the built in toolbar visible and have an arrow image on the left and right of the div to move to the previous and next images and also allow swiping. How do I call the JavaScript in photoswipe.js
to do this manually on the click of an image.
I found the answer after some digging and after doing many complicated things. The answer is quite simple.
Since I have an instance of the PhotoSwipe object(psInstance), you simply do: psInstance.next(); OR psInstance.prev();