diff --git a/public/articolo.php b/public/articolo.php index cbef83b..9a3a4a6 100644 --- a/public/articolo.php +++ b/public/articolo.php @@ -352,7 +352,7 @@ GUIHandler::generateHtmlHeaders(array("additionalHeaders"=>$additionalHeaders)); if(sizeof($medias)>0){ ?> function loadImage(pos){ -// var position = items.indexOf(imageId); + var pswpElement = document.querySelectorAll('.pswp')[0]; //build items array @@ -360,11 +360,9 @@ if(sizeof($medias)>0){ //define options (if needed) var options = { - // optionName: 'option value' - // for example: index: pos // start at slide }; - // alert(items); + //Initializes and opens PhotoSwipe var gallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, items, options); gallery.init();