Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
brusselsprouts

Make a folder link - but NOT on mobile?

Question

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!

Edited by brusselsprouts
Initial Revision

Share this post


Link to post

2 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...