Custom script to open sublink menu in header on link hover

Place this code in your page settings → Custom code → Footer section, relace the BLOCKID with your block name, save and preview

<script>
window.addEventListener('block-loaded-BLOCKID', () => {
    setTimeout(()=>{
        [...document.querySelectorAll('#BLOCKID a')].forEach((link)=>{
            if(!link.hasAttribute('href')) {
              link.addEventListener('mouseover', ()=>{link.click();})
            }
        })
    }, 100);
});
</script>
5 Likes