Class: MediaGallery

.grid.MediaGallery(target, contentData, allowEmptyGallery, scrollElement)

A media gallery grid with responsive and lazy image loading and a fullscreen view for single images.

Constructor

new MediaGallery(target, contentData, allowEmptyGallery, scrollElement)

Set up a media gallery based on justified gallery, photoswipe and lazysizes.
Parameters:
Name Type Default Description
target string/HTMLElement Target HTML element, serves as anchor for the media gallery.
contentData Object Gallery data object containing the content.
allowEmptyGallery Boolean false Do not throw error if number of gallery items is zero.
scrollElement HTMLElement Element containing the vertical media gallery scrollbar.
Author:
Source:

Extends

  • MediaGalleryLoader