nickjamespiper Posted September 1, 2020 Share Posted September 1, 2020 Site URL: http://nickpiper.tv I have three options for users to click in my navigation bar. FILMS ABOUT PEOPLE There is a secondary drop down menu under the PEOPLE link that reveals three options for users to click on: PEOPLE EFFECTS CARS When users click on these links is there a way to make the navigation bar update to show the title of the drop down menu page, so for example if a user selects EFFECTS, then the navigation bar updates to: FILMS ABOUT EFFECTS I understand this will require some unsupported code editing, but I'm hoping someone has a clever trick they can share. Thanks Link to comment
Beyondspace Posted September 1, 2020 Share Posted September 1, 2020 You can insert this snippet in the FOOTER Settings -> Advanced -> Code Injection <script> (function() { var matchedUrl = location.href.replace(location.origin, "") var linkItem = document.querySelector('.Header-nav-folder-item[href*="'+matchedUrl+'"]'); if (linkItem) { linkItem.parentNode.previousElementSibling.innerText = linkItem.innerText; } })(); </script> BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.