Tridi — Lazy loading

This docs is for Tridi v1.x. Read Tridi v2 documentation or how to upgrade to version 2.x

Tridi offers lazy loading via lazy option. When set to true, preloading images will not be triggered until user clicks / taps inside a Tridi container.

If lazy loading is used, autoplay will not launch until user interacts with the container.

It is not advisable to use lazy together with hintOnStartup. Setting both to true will force user to make two clicks / taps to trigger image load.

Options

  • lazy (boolean) - enables / disables lazy loading images. Optional, defaults to false

Code

HTML

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

JavaScript

new Tridi({
  element: '#tridi-lazy',
  location: './path/to/image/folder',
  format: 'jpg',
  count: 36,
  lazy: true
}).load();

« Back to main page