Lightboxby Lokesh Dhakar
The original lightbox script
Download a zip of the latest release (or any previous one) from the Github Releases page.
Or install using npm:
npm install lightbox2 --save
Open up the zip file and take a peek at the barebones, working example that is included in the
Make sure jQuery, which is required by Lightbox, is also loaded.
lightbox.js. jQuery 1.7 or greater is required, and since the effects module is utilized, the jQuery slim build is not supported.
dist/js/lightbox-plus-jquery.js instead of
lightbox.css are in the correct location. You can grab the images from the
data-lightbox attribute to any image link to enable Lightbox. For the value of the attribute, use a unique name for each image. For example:
data-title attribute if you want to show a caption.
data-alt attribute if you want to set the alt attribute of the linked image.
data-lightbox attribute value for all of the images. For example:
Lightbox2 has been tested successfully in the following browsers:
lightbox-plus-jquery.js file includes jQuery v2.x and supports IE 9+. If you want to support IE 6, 7, and 8, use your own copy of jQuery v1.x with
Lightbox2 is licensed under The MIT License.
Follow the steps below to get help. Make sure you have read the documentation on this page and looked at the included example first.
Do not use Github Issues to report personal support requests.
If you find a bug, please file a Github issue.