Skip to content

1.3.0

Latest

Choose a tag to compare

@byronjohnson byronjohnson released this 20 Nov 18:09
· 1 commit to develop since this release

Added

  • Separate galleries. Set data-lightbox-group on an image or a parent. Triggers that share that name cycle only with each other.
  • A single image. A group of one image opens alone. Previous, next, swipe, and arrow keys do not advance it. Pinch-zoom still works.
  • groupAttribute. Optional init() setting when data-lightbox-group is already in use. The default name is data-lightbox-group.

Unchanged

Triggers without data-lightbox-group still share one gallery. data-lightbox is still the full-size image URL. Call init() once.

<img src="hero-thumb.jpg" data-lightbox="hero.jpg" data-lightbox-group="hero" alt="Hero">
<div data-lightbox-group="trip">
  <img src="a-thumb.jpg" data-lightbox="a.jpg" alt="Stop one">
  <img src="b-thumb.jpg" data-lightbox="b.jpg" alt="Stop two">
</div>
npm install litelight-js@1.3.0

Changelog