window.addEventListener('load', function(){ // Comfirm Script Event let comfirmPage = document.querySelector('.comfirm'); if(comfirmPage){ let lists = document.querySelectorAll('.comfirm .list li'); lists.forEach((list) => { list.addEventListener('click', function(){ // Let let answer = list.querySelector('.answer'); list.classList.toggle('active'); if(list.classList.contains('active')){ answer.style.maxHeight = answer.scrollHeight + "px"; } else { answer.style.maxHeight = 0; } }); }) // let telLinks; // let hrefData = []; // function telEvent(){ // telLinks = document.querySelectorAll('[href^="tel:"]'); // telLinks.forEach((link, index) => { // if (!hrefData[index]) { // hrefData[index] = link.getAttribute('href'); // } // if(window.innerWidth > 768){ // link.removeAttribute('href'); // } else { // if (hrefData[index] && !link.getAttribute('href')) { // link.setAttribute('href', hrefData[index]); // } // } // }) // } // telEvent(); // window.addEventListener('resize', telEvent); } }, false);