kernholz Posted November 8, 2022 Share Posted November 8, 2022 Hello, Do you know if it is possible that the folders in the header stay red after I click on the links in the wrapper? So that I know which main category I clicked on? Thank you so much for your help! https://koala-circle-rbwp.squarespace.com/ Link to comment
tuanphan Posted November 8, 2022 Share Posted November 8, 2022 Try adding this to Last Line in Code Injection > Footer <script> var btnContainer = document.getElementById("header"); var btns = btnContainer.getElementsByTagName("a"); for (var i = 0; i < btns.length; i++) { btns[i].addEventListener("click", function() { var current = document.getElementsByClassName("active"); if (current.length > 0) { current[0].className = current[0].className.replace(" active", ""); } this.className += " active"; }); } </script> <style> header#header a.active { border-bottom: 1px solid currentColor !important; } </style> kernholz 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
kernholz Posted November 9, 2022 Author Share Posted November 9, 2022 thank you very much for your reply! unfortunately it does not work somehow Link to comment
tuanphan Posted November 11, 2022 Share Posted November 11, 2022 On 11/9/2022 at 7:22 PM, kernholz said: thank you very much for your reply! unfortunately it does not work somehow Can you keep the code in Code Injection? We will check it again 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
kernholz Posted November 11, 2022 Author Share Posted November 11, 2022 okay, its there now, thanks a lot Link to comment
tuanphan Posted November 12, 2022 Share Posted November 12, 2022 ah okay Try adding this code to all Stadtmobel sub Pages Header, if it works, I will give instruction for other folders <style> div.header-nav-item:nth-child(1)>a { color: red !important; } .header-menu-nav-folder[data-folder="root"]>div>div:nth-child(1)>a { color: red !important; } </style> 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
kernholz Posted November 14, 2022 Author Share Posted November 14, 2022 hey, somehow the Stadtmöbel becomes red but stays red the whole time Link to comment
tuanphan Posted November 14, 2022 Share Posted November 14, 2022 6 minutes ago, kernholz said: hey, somehow the Stadtmöbel becomes red but stays red the whole time You mean change color of active page (eg if users on lamellenbaenke page, will change color of lamellenbaenke item), or change color of Folder Title? Above is Folder Title (eg if users on lamellenbaenke page, will change color of Stadtmöbel)? 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
kernholz Posted November 14, 2022 Author Share Posted November 14, 2022 i mean the second option. If people click on "Lamellenbänke", "Stadtmöbel" folder title should be red Link to comment
tuanphan Posted November 20, 2022 Share Posted November 20, 2022 On 11/12/2022 at 3:37 PM, tuanphan said: ah okay Try adding this code to all Stadtmobel sub Pages Header, if it works, I will give instruction for other folders <style> div.header-nav-item:nth-child(1)>a { color: red !important; } .header-menu-nav-folder[data-folder="root"]>div>div:nth-child(1)>a { color: red !important; } </style> Have you tried this code for First Folder yet? I just tested it again & it seems work 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
kernholz Posted December 5, 2022 Author Share Posted December 5, 2022 I have tried it; somehow when i inject it in header, the "Stadtmöbel' stays red, even if I click on a different folder 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