Jump to content

How to disable clicking on portfolio hover item?

Go to solution Solved by Agha_Waqas,

Recommended Posts

  • Solution
15 minutes ago, MTakai said:

Site URL: https://takai.works

Hi there,

Was wondering how I could disable clicking on portfolio hover items? They're the four links you see in the center of my homepage. I have access to code injection, by the way.

Thanks!

Hi you can add below script into footer injection
<script>

var all_links = document.querySelectorAll(".portfolio-hover-items-list li a");

for(var i=0; i<all_links.length; i++){
    all_links[i].removeAttribute("href");
}

</script>

Link to comment
  • 1 year later...
On 3/13/2023 at 2:14 AM, Itamar said:

@Agha_Waqas any way this can be don to a specific grid item href?

 

site URL: https://quillfish-star-szda.squarespace.com/

Pass: planetapes

Add to Settings > Advanced > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
	$('#gridThumbs 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!)

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.