-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Demo for srcset support #10
Comments
You can use import * as basicLightbox from 'basiclightbox'
const instance = basicLightbox.create(`
<img src="assets/images/image.png" srcset="image.png 1x, [email protected] 2x" width="800" height="600">
`)
instance.show() I agree that an official demo would be nice! PR welcome. |
@electerious: And can this lightbox also re-use the srcset from an existing linked |
Yes, basicLightbox can show whatever you pass to it. Here's a quick example (untested): import * as basicLightbox from 'basiclightbox'
const img = document.querySelector('#img')
const html = img.outerHTML
const instance = basicLightbox.create(html)
instance.show() |
@electerious: A WordPress plugin would be great! |
A demo for srcset support would be great!
The text was updated successfully, but these errors were encountered: