mreq / slick-lightbox

A lightbox wrapper for Ken's amazing slick carousel.
http://mreq.github.io/slick-lightbox/
MIT License
229 stars 103 forks source link

Feature Request: Allow the lightbox to be disabled on small screens #28

Closed davidklebanoff closed 8 years ago

davidklebanoff commented 8 years ago

Currently I'm using the lightbox on a responsive website, and it's really working great across all screen sizes! However, I think it would be nice to have the ability to disable the lightbox at set screen widths since sometimes, especially on mobile devices, the lightbox version of the picture may be smaller than the original slick version - basically providing no additional value.

Thoughts?

Another option is to expose the ability for someone to cancel the opening of the lightbox inside the 'show.slickLightbox' event.

mreq commented 8 years ago

That's a great idea! I don't think handling this from an event is possible, but I could add a beforeShow option/method, which (if it returns false) would prevent the lightbox from opening.