Liquid error: Error in tag 'section' - 'popup' is not a valid section type
function onPopupLoad() { const myPopup = document.getElementById('modal_popup'); if(!myPopup) return; myPopup.classList.add('is-show'); const closePopupElement = document.getElementsByClassName('js-modal-close'); for( let i = 0; i < closePopupElement.length; i++ ) { closePopup(closePopupElement[i]); } function closePopup(element) { if(!element) return; element.addEventListener('click', function() { myPopup.classList.remove('is-show'); }) } } window.addEventListener('DOMContentLoaded', onPopupLoad );