function openModal(e){
    console.log(e.currentTarget)
const eventText = e.currentTarget.previousElementSibling.textContent
const modalText = document.querySelector('.p-modal')
modalText.textContent = ""
modalText.textContent = eventText
const modal = document.querySelector('.modal')
modal.style.display = "block"
document.body.style.background = 'rgba(128, 128, 128, 0.5)'
e.stopPropagation()
window.addEventListener('click',closeIf)
}
// create a function to open the modal with the select text
create a function to open the modal with the select text
create a function to open the modal with the select text
function openModal(e){
    console.log(e.currentTarget)
const eventText = e.currentTarget.previousElementSibling.textContent
const modalText = document.querySelector('.p-modal')
modalText.textContent = ""
modalText.textContent = eventText
const modal = document.querySelector('.modal')
modal.style.display = "block"
document.body.style.background = 'rgba(128, 128, 128, 0.5)'
e.stopPropagation()
window.addEventListener('click',closeIf)
}
function openModal ( e ) { console . log ( e . currentTarget ) const eventText = e . currentTarget . previousElementSibling . textContent const modalText = document . querySelector ( '.p-modal' ) modalText . textContent = "" modalText . textContent = eventText const modal = document . querySelector ( '.modal' ) modal . style . display = "block" document . body . style . background = 'rgba(128, 128, 128, 0.5)' e . stopPropagation ( ) window . addEventListener ( 'click' , closeIf ) }
create a function to open the modal with the select text
create a function to open the modal with the select text