Download
Demo
Main Features
- Responsive, adjustable size on both Desktop and Mobile devices.
- Automatically do everything to create Lightbox, no need any id or class for individually image on the Web page.
- Automatic detect image caption (from alt text) and shows it on the image.
- Dim background effect when Lightbox display.
- Lightweight, Easy to implement.
How to Use it:
1. Load the both Jquery and AutoLightbox.js in your website:
2. Put your images in article tag or you can create your own div
container with specific class.
......some text.....
......some text.....
......some text.....
>
3. Call the AutoLightbox Plugin in your jQuery code with the selector whose images to be shown in the lightbox.
$(document).ready(function(){
$("article").AutoLightbox();
});
4. To change the size of lightbox, update the following settings
$("article").AutoLightbox({
width: 320,
height: 240
});
4. By default, Dim Background effect is on, if you want to turn it off, the statement is:
$("article").AutoLightbox({
dimBackground: false
});