staurora Posted June 9, 2020 Share Posted June 9, 2020 (edited) 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 June 9, 2020 by staurora Link to comment
paul2009 Posted June 9, 2020 Share Posted June 9, 2020 See: staurora 1 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
staurora Posted June 9, 2020 Author Share Posted June 9, 2020 Hi @paul2009 , thank you very much for the quick response. I am new to this forum and am wondering why I am seeing a message that says "Sorry, we can't show this content because you do not have permission to see it" Thanks! Link to comment
tuanphan Posted June 9, 2020 Share Posted June 9, 2020 8 hours ago, paul2009 said: your post in Circle Forum. staurora 1 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
staurora Posted June 9, 2020 Author Share Posted June 9, 2020 I'm very sorry guys! I don't understand what is going on. Paul2009's post is blank and so is tuuanphan's reply. Thanks again for your guys' help with this. It is very appreciated! Link to comment
paul2009 Posted June 9, 2020 Share Posted June 9, 2020 (edited) 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 January 13, 2021 by paul2009 tuanphan, staurora, ebRa and 1 other 3 1 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
staurora Posted June 9, 2020 Author Share Posted June 9, 2020 Thank you so much @paul2009 !!!! The code works perfectly and solves my issue with the un-clickable folders! tuanphan and paul2009 2 Link to comment
Moments2021 Posted February 2, 2021 Share Posted February 2, 2021 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. Link to comment
MaryPhilip_ Posted February 5, 2021 Share Posted February 5, 2021 If you share the link and password to your site someone will be able to give you the code 🙂 Hi 👋 I'm a Squarespace Expert Member, Circle Member & only Squarespace Authorised Trainer in Scotland. Check out my portfolio at Mary Philip. Hit the little 👍 if I've helped. Link to comment
LeauxFi Posted February 13, 2022 Share Posted February 13, 2022 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
tuanphan Posted February 19, 2022 Share Posted February 19, 2022 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
Mikala Posted January 22 Share Posted January 22 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
tuanphan Posted January 26 Share Posted January 26 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
modu Posted June 2 Share Posted June 2 did you get an answer to your question I am actually trying to do the exact same thing Link to comment
tuanphan Posted June 4 Share Posted June 4 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment