lightbox
lightbox copied to clipboard
Thumbnail support for image gallery
Displays image thumbnails in a lightbox window. Example included and documentation updated for this feature.
In the example, you have used the same gallery name multiimages which already exists on the page. If you rename it - which you should as it's a separate gallery - the previews fail. This is because the gallery specifically looks for data-toggle="lightbox" when looking for @gallery_items.
See: https://github.com/ashleydw/lightbox/blob/master/ekko-lightbox.coffee#L78
I would rename the option to something smaller like thumbnail or preview and then you can allow the user to set the option via a data attribute - this would remove the need for the lightbox-preview toggle.
How about moving the thumbnails to the bottom? When viewing a wide but short image, it looks a bit messy:

Could you also add a YouTube and Vimeo video to the example documentation so we can see how the previews work?
Hi! I made the changes you suggested:
- added preview option via data attribute
- Moved preview area to the bottom of the lightbox window
Edit: Added youtube example
Great! If you squash your commits, I'll merge it in and get a new version going