Jump to content

Clickable dropdown folders disappearing

Go to solution Solved by tuanphan,

Recommended Posts

Hi everyone,

Currently experiencing an issue where I've injected a code into my website footer that allows dropdown menus to be clickable and redirect to a hidden page, but the dropdown will occasionally become invisible. It's still clickable; it just doesn't appear. The code injection is:

<script>
  window.addEventListener('load', () => {
    if ('ontouchstart' in window) return;
    const folders = document.querySelectorAll('.header-nav-folder-title');
    folders.forEach(el => {
      if (window.getComputedStyle(el).display !== 'none') {
        const clone = el.cloneNode(true);
        clone.classList.add('replaced-folder');
        clone.tabIndex = '0';
        window.setTimeout(() => {
           el.parentElement.replaceChild(clone, el);
        }, 600)
      }
    });
  });
</script> 

My website url is https://chameleon-duck-wa3e.squarespace.com/, password is kucsc.

Thanks!

Link to comment
  • Replies 2
  • Views 598
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

On 8/13/2024 at 6:23 AM, tuanphan said:

You can use this code under your code to fix problem

<style>
  a.header-nav-folder-title {
    opacity: 1 !important;
}
</style>

 

This worked perfectly, thank you so much!!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.