Jump to content

Navigation Folder Not Clickable

Recommended Posts

Hello everyone, I've been having trouble getting navigation folders to work in the Degraw template (7.1). It appears to me that clicking on the navigation folders does not do anything. When I hover over the folder, I can see the proper URL/page destination in the bottom left corner. However, no amounts of clicks or positioning of the clicks seems to get the page to load.

I thought that the default was to load the first page in the folder, but nothing happens when I click. I've tried multiple iterations of this code injection that I've found in these forums/other websites to no avail:

<!-- Dropdown Accordion Code --><script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
  $( document ).ready(function() {
    $(".header-nav-folder-title").eq(0).prop('href', '/services');
  });
</script>

Anyone else run into this problem? I would really appreciate any insight or help with this!

Thanks in advance for your help!

Edited by staurora
Link to comment

See:

 

About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. 
Content: Links in my posts may refer to SF Digital products or may be affiliate links.
If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too.

Link to comment

In the original posts, I explained that Squarespace have prevented clicking on nav folders in 7.1 which is why previously-posted solutions don't work.

The solution below, posted by @tuanphan should work when added to Settings > Advanced > Code Injection. Modify the links (/folder1, /page1 and so on) to suit your folder urls and pages.

<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script> 
  $(document).ready(function() { 
    $('a.header-nav-folder-title[href="/folder1"]').click(function() { 
      window.location = "/page1"; 
    }); 
    $('a.header-nav-folder-title[href="/folder2"]').click(function() {
      window.location = "/page2";
    });
  }); 
</script>

Note that it may appear to give strange results whilst logged on (for example a double refresh within the preview window) but this is due to the way that preview window is framed, but it should work fine for website visitors (or whilst logged out).

Edited by paul2009

About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. 
Content: Links in my posts may refer to SF Digital products or may be affiliate links.
If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too.

Link to comment
  • 7 months later...

Hi There

I would like to hide the first page in my drop down menu as it is a general page for seo purposes + the general page i would like people to end up if they click on the folder rather than one of the product pages.

How do i hide the first page (Relaxzetels) so that if you click on the folder (Relax) you'll end up on the (Relaxzetels) page but it is not visible in my drop down menu?

 

I use the the template WEST. 

image.png.25c6eacc9e370cf2bac8ee816acc9d56.png

Link to comment
  • 1 year later...
On 6/9/2020 at 12:30 PM, paul2009 said:

In the original posts, I explained that Squarespace have prevented clicking on nav folders in 7.1 which is why previously-posted solutions don't work.

The solution below, posted by @tuanphan should work when added to Settings > Advanced > Code Injection. Modify the links (/folder1, /page1 and so on) to suit your folder urls and pages.

<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script> 
  $(document).ready(function() { 
    $('a.header-nav-folder-title[href="/folder1"]').click(function() { 
      window.location = "/page1"; 
    }); 
    $('a.header-nav-folder-title[href="/folder2"]').click(function() {
      window.location = "/page2";
    });
  }); 
</script>

Note that it may appear to give strange results whilst logged on (for example a double refresh within the preview window) but this is due to the way that preview window is framed, but it should work fine for website visitors (or whilst logged out).

 

Hello, first post here. Sorry to open up an old thread but I don't see a way to message anyone. I'm using @tuanphan code to make my dropdown clickable. And its working as expected... when left-clicked. When left-clicked it opens an overview page which is not linked on the site as I had read to do elsewhere. But, if I middle-click or right-click open in new tab, it instead takes me to the first page in the dropdown. Did I do something wrong? Do I need another workaround? 

 

My site im working on is www.thetenmg.com  try it out on the team folder if you can. Middle clicking and right clicking aren't behaving the way I thought they would. 😞

Link to comment
On 2/13/2022 at 2:30 PM, LeauxFi said:

 

Hello, first post here. Sorry to open up an old thread but I don't see a way to message anyone. I'm using @tuanphan code to make my dropdown clickable. And its working as expected... when left-clicked. When left-clicked it opens an overview page which is not linked on the site as I had read to do elsewhere. But, if I middle-click or right-click open in new tab, it instead takes me to the first page in the dropdown. Did I do something wrong? Do I need another workaround? 

 

My site im working on is www.thetenmg.com  try it out on the team folder if you can. Middle clicking and right clicking aren't behaving the way I thought they would. 😞

For future members, use this new code

<script>
$(document).ready(function() { 
// desktop
  $('.header-nav-item.header-nav-item--folder:nth-child(2)>a').click(function() {
    window.location = "/thetenmembers";
  });
  $('.header-nav-item.header-nav-item--folder:nth-child(2)>a').attr('href','/thetenmembers');
// mobile
  $('.container.header-menu-nav-item [href="/services"]').click(function() {
    window.location = "https://beaverhero.com";
  });
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 11 months later...
On 2/19/2022 at 4:35 AM, tuanphan said:

For future members, use this new code

<script>
$(document).ready(function() { 
// desktop
  $('.header-nav-item.header-nav-item--folder:nth-child(2)>a').click(function() {
    window.location = "/thetenmembers";
  });
  $('.header-nav-item.header-nav-item--folder:nth-child(2)>a').attr('href','/thetenmembers');
// mobile
  $('.container.header-menu-nav-item [href="/services"]').click(function() {
    window.location = "https://beaverhero.com";
  });
});
</script>

 

I did that: https://focusfinder.ch/angebot

Is it possible to click to "Offer" and also to the arrow, so that the sub navigation opens?

Link to comment
On 1/23/2023 at 1:29 AM, Mikala said:

I did that: https://focusfinder.ch/angebot

Is it possible to click to "Offer" and also to the arrow, so that the sub navigation opens?

Hi,

Where is "Offer"?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 4 months later...
On 6/2/2023 at 11:39 PM, modu said:

did you get an answer to your question I am actually trying to do the exact same thing

 

If you share site url, we can help easier

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.