Jump to content

Need Help Disabling Clickability on Project Names but Keeping Hover Effect on Squarespace

Go to solution Solved by tuanphan,

Recommended Posts

Posted

Hello everyone,

I’m working on a site and need some assistance with a specific CSS customization. On my Projects page, I want to remove the clickability from the project names, but I still want to maintain the hover effect when the mouse moves over them.

To clarify, I want the project names to stay static and not link anywhere, but I also want the hover effect (e.g., color change or underline) to remain intact for visual interaction.

Could someone please guide me on the CSS code to achieve this? I used the one chatGPT gave me but I didn't work. Would really appreciate if anyone helped me out.

Aforementioned Code:

.project-item a {

    pointer-events: none; /* Disables the clickability */

    cursor: default; /* Changes the cursor to indicate the link is not clickable */

}

 

.project-item a:hover {

    /* You can keep your hover styles here, such as color change or underline */

    color: #000; /* Example hover color */

    text-decoration: underline; /* Example hover effect */

}

Thank you in advance for any help!

  • Replies 4
  • Views 131
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

 

3 hours ago, festohet said:

On my Projects page, I want to remove the clickability from the project names, but I still want to maintain the hover effect when the mouse moves over them

 

Can you share the link to your project page?

-------- > 👆 <---------- Please quote or @ me when replying, or I won't get a notification 

Melody | Squarespace Nerd

💻 💁‍♀️ 1-2-1 Squarespace Training session <- feeling stuck and want to learn?
👩‍💻 💁‍♀️ Website help <- send me your to-do list. From code to plugin to domain setup.
🧰 See the tools I use (contain affiliate links)
 Did I help? I like coffee (Thank you)

Posted

Sure it's expovibedesigns.com,I recently built the website entirely from scratch. While the process went smoothly overall, I found the ‘Works’ section to be the most challenging. I’m now looking to enhance it further with a counter animation and would appreciate any guidance or recommendations on implementing this feature effectively. If you have any additional notes after visiting the site, I would greatly appreciate your feedback as well.

  • Solution
Posted
On 11/23/2024 at 11:03 PM, festohet said:

 

Sure it's expovibedesigns.com,I recently built the website entirely from scratch. While the process went smoothly overall, I found the ‘Works’ section to be the most challenging. I’m now looking to enhance it further with a counter animation and would appreciate any guidance or recommendations on implementing this feature effectively. If you have any additional notes after visiting the site, I would greatly appreciate your feedback as well.

You can use this code to Website Tools > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script>
jQuery(document).ready(function($){
  $('a.grid-item').removeAttr('href');
})
</script>

 

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!)

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.