Jump to content

how to make a link on the mobile site unclickable.

Recommended Posts

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

Mobile menu has different class. Use this CSS for mobile

.container.header-menu-nav-item a {
    pointer-events: none;
}

 

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
  • 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

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 best , and see my profile. Thanks for your support!

Link to comment

Create an account or sign in to comment

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

×
×
  • 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.