Jump to content

how to make a link on the mobile site unclickable.

Recommended Posts

  • Replies 9
  • Views 1.6k
  • Created
  • Last Reply
10 hours ago, sonny.oram said:

Applying pointer-events: none; to the class should do the trick.

@sonny.oram I have added that code ( shown below ) and it only makes the desktop link unclickable, on the mobile it is still clickable. 

.header-nav-item [href="/new-page-1"] {
    pointer-events: none;
}

 

Link to comment
  • 4 months later...

Wondering I have put his on my site
and it works but I only want it to work for desktop.
a.folder-toggle-label [href="/boys"], a.folder-toggle-label [href="/girls"] {
    pointer-events: none;
}

I would still need see not have this for mobile and tablet 😕
Any update on what to do to only effect desktop and not mobile?

Link to comment

@akytogo

Please post the URL for your site. It is hard to help you when we can't see your site.

If your site is not public please set up a site-wide password, if you've not already done so. Post the password here.

We can then take a look at your issue.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

@akytogo

This should take care of only allowing the effect on desktop.

@media only screen and ( min-width: 769px ) {

  a.folder-toggle-label [href="/boys"],
  a.folder-toggle-label [href="/girls"]
  
    {
    
      pointer-events: none;
      
      }
  }

I was unable to test it as there appears to be no menus with references to /boys or /girls.

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

thanks @creedon looks like this code

label.folder-toggle-label {
    pointer-events: none;
}

That I have is shutting down the main folder from being clickable 

So I would need to let my folders in the nav for boys and girls on mobile be clickable. 

Sorry about the above, hope that makes sense

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.