Added downdown
This commit is contained in:
parent
229c621c22
commit
1343cdf037
@ -219,10 +219,15 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
|
|
||||||
lightboxTrigger.forEach(function (element) {
|
lightboxTrigger.forEach(function (element) {
|
||||||
element.addEventListener('click', function () {
|
element.addEventListener('click', function () {
|
||||||
const imgSrc = element.getAttribute('src');
|
const imgSrc = element.getAttribute('src');
|
||||||
const textContent = element.closest('tr').querySelector('td:nth-child(3)').textContent; // Adjust the index accordingly
|
textContent = ''
|
||||||
lightboxImage.setAttribute('src', imgSrc);
|
try {
|
||||||
|
textContent = element.closest('tr').querySelector('td:nth-child(3)').textContent; // Adjust the index accordingly
|
||||||
lightboxText.textContent = textContent;
|
lightboxText.textContent = textContent;
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
|
|
||||||
|
lightboxImage.setAttribute('src', imgSrc);
|
||||||
lightboxModal.style.display = 'block';
|
lightboxModal.style.display = 'block';
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user