Disable a Navigation link to a collection

Solved

Disable a Navigation link to a collection

ByAprilCo
Shopify Partner
46 0 10

Hey guys! 

 

Can anyone guide me to css or code where I can disable the Nav link for a Collection? Essentially I want the Collection link to only trigger the dropdown in the Nav, vs. going to the Collection Group Template/Page.

 

Site here for reference: https://rainbowtoybox.com.au/ / Password: rainbow

 

Nav links: Shop by Brand and Shop by Collection

 

thank you!

Accepted Solution (1)

BSS-Commerce
Shopify Partner
3477 464 554

This is an accepted solution.

Hi @ByAprilCo 

You can try our suggestion below:

1. Search "CSS"

view (6).png

2. Scroll down to the end and add the code

.disable-click{
  pointer-events: none;
}

view (7).png

3. Scroll down and add this code like the image

<script>
      let disableClick = document.querySelectorAll(".list-menu li menu-dropdown");
      disableClick[1].querySelector("a").classList.add("disable-click")
      disableClick[2].querySelector("a").classList.add("disable-click")
</script>

view (9).png

If it's useful to you, please let me know by giving a like or marking it as a solution. Also, feel free to contact me if you need any.

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


B2B Solution & Custom Pricing | Product Labels by BSS


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency

View solution in original post

Replies 2 (2)

BSS-Commerce
Shopify Partner
3477 464 554

This is an accepted solution.

Hi @ByAprilCo 

You can try our suggestion below:

1. Search "CSS"

view (6).png

2. Scroll down to the end and add the code

.disable-click{
  pointer-events: none;
}

view (7).png

3. Scroll down and add this code like the image

<script>
      let disableClick = document.querySelectorAll(".list-menu li menu-dropdown");
      disableClick[1].querySelector("a").classList.add("disable-click")
      disableClick[2].querySelector("a").classList.add("disable-click")
</script>

view (9).png

If it's useful to you, please let me know by giving a like or marking it as a solution. Also, feel free to contact me if you need any.

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


B2B Solution & Custom Pricing | Product Labels by BSS


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
ByAprilCo
Shopify Partner
46 0 10

Absolute Legend!!! Thank you so soooo much!