Minimalist Image Lightbox Library – imgLightbox.js

Category: Javascript , Modal & Popup | September 7, 2017
Author: Serrin
Views Total: 318
Official Page: Go to website
Last Update: September 7, 2017
License: MIT

Preview:

Minimalist Image Lightbox Library – imgLightbox.js

Description:

imgLightbox.js is a dead simple JavaScript lightbox library which overlays images on top of the current page.

How to use it:

Load the ‘imglightbox.js’ and ‘imglightbox.css’ in the html page.

<link href="imglightbox.css" rel="stylesheet">
<script src="imglightbox.js"></script>

Insert the lightbox DIVs as displayed below into the page:

<div id="imgLightbox" onclick="imgLightbox.close();"> 
  <div id="imgLightbox-button" onclick="imgLightbox.close();">&Cross;</div> 
</div>

The JavaScript to show your image in the lightbox.

imgLightbox.open('1.jpg');