Hi ,
can someone enplane me what this code does const modal = document.querySelector(button.dataset.modalTarget) and tell me how to read it .
This code is from
openModalButtons.forEach(button => {
button.addEventListener('click', () => {
const modal = document.querySelector(button.dataset.modalTarget)
openModal(modal)
})
})
I can't use the insert code , sorry .
(Added [code]...[/code]
tags ~ MOD)