Currently facing an issue while trying to create a modal by fetching data from a JSON file. The 'click' events seem to be malfunctioning within the authoring system, whereas if I manually insert the link and modal in my HTML file, everything works perfectly.
projectUi(items){
let result = '';
items.map(item=>{
result +=`
<div class="details-project">
<a class="js-modal" href="#${item.modal}"></a>
</div>
<aside style="display: none;" id="${item.modal}" class="modal" aria-hidden="true" role="dialog" aria-labelledby="titleModal">
<div class="modal-wrapper js-modal-stop">
<button class="js-modal-close">Close</button>
<h1 id="titleModal">Title ${item.modal}</h2>
</div>
</aside>
`
});
const allPortfolio = document.querySelector('.all-portfolio');
allPortfolio.innerHTML = result;
}