brusselsprouts Posted September 19, 2019 Share Posted September 19, 2019 Hi, folks - I'm building a site using a Brine child theme. I wanted to make my folder links in my topline nav link to pages (which should be easy to do!) and found that several folks had crafted solutions to this, so that's great! I went with the simple HTML workaround described here, and it's working great. However: I then noticed that on mobile, the folders I've added links to don't expand — they just go to the page I've linked to. (For example: say I have a folder called "Projects." I renamed that folder < a href="/projects" > Projects < /a > ...so that it now links to my "all projects" landing page. On desktop, a user could either mouse over "Projects" to see a list of projects, or click on "Projects" to go to that landing page. However, on mobile, the user can only tap "Projects," which takes you straight to the landing page, and doesn't allow you to see the list of projects that appear in the dropdown on desktop.) My question, then: is there a workaround to make a folder link on desktop but NOT on mobile? I know there are some Javascript-based solutions to the "add a link to your folder" issue (e.g. https://answers.squarespace.com/questions/23951/can-i-link-a-folder-to-a-specific-page.html). Since, well, I'm a complete Javascript noob: is there anything like a @media query for JS? i.e. could I modify that script to say, "if we're collapsed for mobile view, no link!" — or might there be any other ways to address this? Thanks, all! Link to comment
tuanphan Posted September 20, 2019 Share Posted September 20, 2019 You can make 2 folder link. and use CSS to hide 1 on Desktop, hide 1 on Mobile :-D @brusselsprouts 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
tuanphan Posted September 20, 2019 Share Posted September 20, 2019 You can make 2 folder link. and use CSS to hide 1 on Desktop, hide 1 on Mobile :-D @brusselsprouts 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.