How to loop multiple images on a single page/post
-
Hello I am using openseadragon, and I was able to reference one image on my page via openseadragon, but how to do loop more images so I can have 5 more images on the page…
Currently I have this as my javascript.
[code] var imagePath = "/wp-content/uploads/" + $('#materials-osd').attr('data-image');
var viewer = OpenSeadragon({
id: "materials-osd",
prefixUrl: "/wp-content/plugins/zoom-openseadragon/images/",
tileSources: {
type: "image",
url: imagePath,
buildPyramind: false
}
});})(jQuery);
[/code]
And this is my code I inputted into a wordpress block.
[code]<div id="materials-osd" style="height:460px; width:310px;" data-image="2020/05/dscn0348-1.jpg"></div>
<div id="materials-osd" style="height:460px; width:310px;" data-image="2020/05/DSC_0157-1.jpg"></div>[/code]
- The topic ‘How to loop multiple images on a single page/post’ is closed to new replies.