
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();">⨯</div> </div>
The JavaScript to show your image in the lightbox.
imgLightbox.open('1.jpg');Open the lightbox with a download button.
imgLightbox.open('1.jpg',true);Open the image in a new window.
imgLightbox.open('1.jpg',false,true);Changelog:
v1.0.5 (11/18/2020)
- new config and open method parameter (newwindow)
- JS fixes
v1.0.4 (07/27/2020)
- new download HTML5 entity






