Tridi v2 — Image array

Looking for older version? Read Tridi v1 documentation or how to upgrade to version 2.x

Tridi offers an option to use custom arrays of image paths while initializing the container. To use this option, pass your image array to images property.

Code

HTML

<div id="tridi-array"></div>

JavaScript

const imgArray = new Array(36)
  .join()
  .split(',')
  .map(function(item, index) {
    return '../images/white/' + ++index + '.jpg';
  });

const tridiInstance = Tridi.create({
  element: '#tridi-array',
  images: imgArray,
});

tridiInstance.load();

« Back to main page