# Lightbox (JavaScript)

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Lightbox_(JavaScript)
> Markdown URL: https://mediated.wiki/source/Lightbox_(JavaScript).md
> Source: https://en.wikipedia.org/wiki/Lightbox_(JavaScript)
> Source revision: 1244434402
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

JavaScript library

A typical lightbox image display

**Lightbox** is a [JavaScript](/source/JavaScript) library that displays images and videos by filling the screen, and dimming out the rest of the [web page](/source/Web_page).[1]

The original JavaScript library was written by Lokesh Dhakar.[2] The term Lightbox may also refer to other similar JavaScript libraries. The technique gained widespread popularity due to its simple and elegant style.

The original Lightbox library used two JavaScript libraries, [Prototype Javascript Framework](/source/Prototype_Javascript_Framework)[3] and [script.aculo.us](/source/Script.aculo.us),[4] for its animations and positioning. In April 2012, the [plugin](/source/Plug-in_(computing)) was rewritten for [jQuery](/source/JQuery).[5] The open-source nature of Lightbox encouraged developers to modify and fork the code, resulting in plugins such as Colorbox, Magnific Popup, Slimbox or Thickbox.

Lightbox scripts are dependent upon a browser's [JavaScript](/source/JavaScript) support.[6] Browsers that do not load the script for whatever reason can instead simply load the image as a separate page load, losing the Lightbox effect but still retaining the ability to display the image.[7]

## References

1. **[^](#cite_ref-useit_1-0)** Jakob Nielsen, Alertbox. ["10 Best Application UIs"](http://www.useit.com/alertbox/application-design.html).

1. **[^](#cite_ref-2)** Dhakar, Lokesh. ["Lightbox JS"](http://lokeshdhakar.com/projects/lightbox/). Retrieved 2012-12-17.

1. **[^](#cite_ref-Herrington_3-0)** Herrington, Jack D. ["Ajax and XML: Ajax for lightboxes"](http://www.ibm.com/developerworks/library/x-ajaxxml6/). *IBM DeveloperWorks*. Retrieved 2008-05-21.

1. **[^](#cite_ref-Schmitt_4-0)** Schmitt, Christopher (2006). *CSS Cookbook*. [O'Reilly](/source/O'Reilly_Media). p. 204. [ISBN](/source/ISBN_(identifier)) [0-596-52741-1](https://en.wikipedia.org/wiki/Special:BookSources/0-596-52741-1).

1. **[^](#cite_ref-5)** Dhakar, Lokesh. ["Lightbox2"](http://lokeshdhakar.com/projects/lightbox2/). Retrieved 2012-12-17.

1. **[^](#cite_ref-Schmitt2_6-0)** Schmitt, Christopher (2006). *CSS Cookbook*. [O'Reilly](/source/O'Reilly_Media). p. 207. [ISBN](/source/ISBN_(identifier)) [0-596-52741-1](https://en.wikipedia.org/wiki/Special:BookSources/0-596-52741-1).

1. **[^](#cite_ref-Zervaas_7-0)** Zervaas, Quentin (2007). [*Practical Web 2.0 Applications with PHP*](https://archive.org/details/practicalweb20ap0000zerv/page/423). Springer. pp. [423](https://archive.org/details/practicalweb20ap0000zerv/page/423). [ISBN](/source/ISBN_(identifier)) [1-59059-906-3](https://en.wikipedia.org/wiki/Special:BookSources/1-59059-906-3).

## External links

- Media related to [Lightbox (JavaScript)](https://commons.wikimedia.org/wiki/Category:Lightbox_(JavaScript)) at Wikimedia Commons

---
Adapted from the Wikipedia article [Lightbox (JavaScript)](https://en.wikipedia.org/wiki/Lightbox_(JavaScript)) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Lightbox_(JavaScript)?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
