HopeG Posted June 17, 2022 Share Posted June 17, 2022 Site URL: https://www.lpugh.com/ Hi there, Was wondering if you could help me? I am using a folder (titled "Fire Protection") to create a dropdown list in the top menu of a site I'm working on. I want the folder titled "Fire Protection" to link to this page /fireprotection. However, I want the dropdown menu items beneath it to not be linked (essentially an un-clickable list). I found a code that achieves this on desktop. On mobile, however, when you click on the folder title it just opens up the un-clickable list instead of linking to the page like on desktop. Is there a way to maybe hide the dropdown menu on mobile and just have the folder title direct to /fireprotection? Thanks in advance! Link to comment
tuanphan Posted June 18, 2022 Share Posted June 18, 2022 Add to Last Line in Code Injection > Footer <script> $(document).ready(function() { $('.header-menu-nav-folder[data-folder="root"]>div>div:nth-child(3)').click(function() { window.location = "/fireprotection"; }); }); </script> <style> [data-folder="/fireprotection-folder/"] { display: none; } span.chevron.chevron--right { display: none; } </style> 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
HopeG Posted June 20, 2022 Author Share Posted June 20, 2022 On 6/18/2022 at 3:42 AM, tuanphan said: Add to Last Line in Code Injection > Footer <script> $(document).ready(function() { $('.header-menu-nav-folder[data-folder="root"]>div>div:nth-child(3)').click(function() { window.location = "/fireprotection"; }); }); </script> <style> [data-folder="/fireprotection-folder/"] { display: none; } span.chevron.chevron--right { display: none; } </style> Hi @tuanphan, Thanks for this. When I added this code to the footer Code Injection, and click "Fire Protection" on mobile, it open up to a blank menu (see screenshot attached), but doesn't open to the /fireprotection page. Any idea what I might be doing wrong? Thanks so much! 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