Skip to content
Snippets Groups Projects
Commit a72a3113 authored by Olivia206's avatar Olivia206
Browse files

oups

parent eb58df54
No related branches found
No related tags found
No related merge requests found
import gLightbox from 'glightbox';
let lightboxBtn;
const lightbox = gLightbox({
gLightbox({
openEffect: 'fade',
closeEffect: 'fade',
onOpen: () => {
lightboxBtn = document.activeElement;
},
onClose: () => {
if (lightboxBtn) {
lightboxBtn.focus();
}
}
closeEffect: 'fade'
});
lightbox.on('slide_changed', () => {
const currentSlide = document.querySelector('.gslide.current');
if (currentSlide) {
currentSlide.setAttribute("tabindex", "0");
currentSlide.focus();
}
});
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment