chiro-canto/public/gallery/scripts/gallery.js
2021-04-15 12:29:53 +02:00

10 lines
297 B
JavaScript
Executable File

images = document.getElementsByTagName('img');
for (img of images) {
img.addEventListener('click', function() {
if (img.classList.contains("fullscreen")) {
img.classList.remove('fullscreen');
} else {
img.classList.add('fullscreen');
}
});
}