Lightboxby Lokesh Dhakar
The original lightbox script.
Eight years later — still going strong!
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.
lightbox.cssare in the correct location. You can grab the images from the
data-lightboxattribute to any image link to enable Lightbox. For the value of the attribute, use a unique name for each image. For example:
data-titleattribute if you want to show a caption.
data-altattribute if you want to set the alt attribute of the linked image.
data-lightboxattribute value for all of the images. For example:
Lightbox2 has been tested successfully in the following browsers:
lightbox-plus-jquery.jsfile 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.