I would like to disable auto refresh from clicking my icon-banner

adipure
Tourist
12 0 1

Hello,

 

I have a customized theme and Have hard time with customizing the websites.

I have a trouble with disabling a click button from my icon-banner

Here is my website link :

https://2218wkdr1zovb7dy-59329609934.shopifypreview.com

 

And when I click on these icon, the site refreshes and reloads to the main page.

adipure_0-1700177475247.png

So I would like to disable the refresh attribute when i click on the icon. (Hover effects are okay)

 

Please Help 

Thank you.

 

Reply 1 (1)

Spac-es
Shopify Partner
327 96 109

You can remove the href from each container 1 by 1:

 

Captura de pantalla 2023-11-17 004103.png

 

Or you can add this code in your theme.liquid:

<script>
  document.addEventListener('DOMContentLoaded', function() {
    var links = document.querySelectorAll('.tt-services-block');

    links.forEach(function(link) {
      link.addEventListener('click', function(event) {
        event.preventDefault();
      });
    });
  });
</script>