electerious / electerious/basicLightbox
<picture> tag support
- Lingua principale
- JavaScript
- Stelle
- 604
- Fork
- 57
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I am trying to add support for webp image formats with jpg fallbacks. When I write my listener like this the lightbox works as intended:
```
window.addEventListener('load', (event) => {
document.querySelectorAll('.modal').forEach(image => {
image.addEventListener('click', e => {
basicLightbox.create(`
`).show();
});
});
});
```
However, when I write my listener like this, the lightbox does not close when I click on the image, only when I click on the background, making the lightbox difficult to close:
```
window.addEventListener('load', (event) => {
document.querySelectorAll('.modal').forEach(image => {
image.addEventListener('click', e => {
basicLightbox.create(`
`).show();
});
});
});
```
I imagine this has something to do with the `` tag. Any thoughts on why this would be happening? Thanks
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.