Ooooooook good !
This commit is contained in:
@ -101,11 +101,11 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
photoEl.addEventListener('click', () => {
|
||||
console.log('Photo clicked');
|
||||
// get next photo-full element inside the parent div
|
||||
let fullPhoto = photoEl.parentElement.querySelector('.photo-full');
|
||||
let fullPhoto = photoEl.parentElement.querySelector('.modal');
|
||||
if (!fullPhoto) return;
|
||||
fullPhoto.style.display = 'block';
|
||||
fullPhoto.classList.toggle('is-active');
|
||||
fullPhoto.addEventListener('click', () => {
|
||||
fullPhoto.style.display = 'none';
|
||||
fullPhoto.classList.toggle('is-active');
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user