diff --git a/application/views/mobile_first/gh-pc.php b/application/views/mobile_first/gh-pc.php index 8fe9a46f..af4622b1 100644 --- a/application/views/mobile_first/gh-pc.php +++ b/application/views/mobile_first/gh-pc.php @@ -312,28 +312,30 @@ height="0" width="0" style="display:none;visibility:hidden"> function loadScriptByAsync(src) {var asyncScript = document.createElement("script");asyncScript.async = true;asyncScript.crossorigin = "anonymous";asyncScript.src = src;firstScript=document.getElementsByTagName("script")[0];firstScript.parentNode.insertBefore(asyncScript, firstScript);} +((doc, buttonId, contentId) => { + doc.addEventListener('DOMContentLoaded', () => { + var moreButton = doc.getElementById(buttonId); + var contentDiv = doc.getElementById(contentId); + var lastContentDiv = doc.getElementById(lastContentId); + if (moreButton === null || contentDiv === null || lastContentDiv === null) { + console.warn('CHECK MORE config error'); + return; + } + moreButton.addEventListener('click', () => { + moreButton.classList.add('gh-animate-fade-out'); + setTimeout(() => { + moreButton.classList.add('gh-display-none'); + }, 80); + contentDiv.classList.remove('gh-display-none'); + lastContentDiv.classList.remove('normal_content'); + setTimeout(() => { + contentDiv.classList.remove('gh-animate-slide-down'); + contentDiv.classList.add('gh-animate-slide-up'); + }, 0); + }); + }); +})(document, 'checkMoreButton', 'moreContentDiv', 'lastContentDiv'); + +((doc, buttonId, contentId) => { + doc.addEventListener('DOMContentLoaded', () => { + var moreButton = doc.getElementById(buttonId); + var contentDiv = doc.getElementById(contentId); + var lastContentDiv = doc.getElementById(lastContentId); + if (moreButton === null || contentDiv === null || lastContentDiv === null) { + console.warn('CHECK MORE config error'); + return; + } + moreButton.addEventListener('click', () => { + moreButton.classList.add('gh-animate-fade-out'); + setTimeout(() => { + moreButton.classList.add('gh-display-none'); + }, 80); + contentDiv.classList.remove('gh-display-none'); + lastContentDiv.classList.remove('normal_content'); + setTimeout(() => { + contentDiv.classList.remove('gh-animate-slide-down'); + contentDiv.classList.add('gh-animate-slide-up'); + }, 0); + }); + }); +})(document, 'checkMoreButton', 'moreContentDiv', 'lastContentDiv'); +