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 me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

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.

Please see my post entitled How to make Squarespace navigation dropdowns clickable.

Did this help? Please give feedback by clicking an icon below  ⬇️

Edited by paul2009

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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
  • 4 months later...

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.