Button Photosweep关闭库按钮代码

Button Photosweep关闭库按钮代码,button,photoswipe,Button,Photoswipe,我已经尝试使用history.go(-1)关闭Photosweep屏幕库;但它把我带到了我的画廊所在的前一个屏幕。如何在调用我的图库的页面中使用代码关闭Photosweep屏幕图库?提前谢谢。我用这句话做到了: window.Code.PhotoSwipe.activeInstances[0].instance.hide(); 对于Photosweep v.1.0.11,正确的代码是window.code.photosweep.Current.hide();

我已经尝试使用history.go(-1)关闭Photosweep屏幕库;但它把我带到了我的画廊所在的前一个屏幕。如何在调用我的图库的页面中使用代码关闭Photosweep屏幕图库?提前谢谢。

我用这句话做到了:

window.Code.PhotoSwipe.activeInstances[0].instance.hide();

对于Photosweep v.1.0.11,正确的代码是window.code.photosweep.Current.hide();