Apr 01, 2014 in Lightbox 5010 views
A simple lightbox plugin based on the bootstrap modal plugin.This is a plugin for Twitter Bootstrap that adds a lightbox that is based off the modal dialog.
All you need to do is add data-toggle="lightbox" and href="#lightbox" or data-target="#lightbox" to a link, and set the href so it references the lightbox you want to display.
<a data-toggle="lightbox" href="#demoLightbox">Open Lightbox</a>
Open the lightbox with the id myLightbox.
$('#myLightbox').lightbox(options)
Name | Type | Default | Description |
---|---|---|---|
backdrop | boolean | true | This adds a modal-backdrop element. |
keyboard | boolean | true | Pressing escape closes the lightbox. |
show | boolean | true |
Shows the lightbox when initialized. Note: This only applies when using JavaScript to setup the lightbox. |
resizeToFit | boolean | true | This resizes the image to fit the window if the image is too large. |
Tagged with:
bootstrap lightbox
bootstrap
lightbox
simple lightbox
modal plugin
modal dialog
modal
dialog
twitter bootstrap
Related Articles