0.1.7 • Published 7 years ago

xz-lightbox v0.1.7

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

Lightbox

The Native Javascript lightbox. Support ie11 and modern browsers.

Get Started

  • via NPM
npm i --save xz-lightbox@latest

import lightbox from 'xz-lightbox'
lightbox.option({...}).start()
  • via CDN
<link rel="stylesheet" href="https://unpkg.com/xz-lightbox@latest/dist/lightbox.min.css">
<script src="https://unpkg.com/xz-lightbox"></script>
<script>
 lightbox.option({...}).start();
</script>

Simple API

lightbox.option({
    duration: 618,   // transition time ms           default: 618
    hide: true,      // need hide img be clicked     default: false
    offset: 100,     // offset to window             default: 100
    template: '$index of $total photos' // album pagination template
}).start();

lightbox.option({
	onShowing: () => ({}),         // start showing
	onShowed: () => ({}),          // showing transition end, showed
	onDisappearing: () => ({}),    // start disappearing
	onDisappeared: () => ({}),     // disappearing transition end, disappeared
}).start();;
0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago