Jump to content

How to translate CTA button in a way it doesnt jump when navigate between menu items

Recommended Posts

Site URL: https://cinnamon-chameleon-6wa9.squarespace.com/

Hi, I managed to change in estonian version nicely but english version it changes all the time to "Kontakt" to "Contact" visbily:

https://cinnamon-chameleon-6wa9.squarespace.com/en/home

 

Code I used:

 /* ADD EXCLUSION NAV ITEMS */
  $('.exclude-me,.exclude-me a').addClass('exclude');
  $('.sqs-svg-icon--list a,.SocialLinks-link').addClass('exclude');
});
    $(document).ready(function(){
    $("body.body-en a.btn").html(function() { 
          return $(this).html().replace("Kontakt", "Contact");  
    });
  $("body.body-en a.btn").attr('href','/en/contact');
        });
</script>

 

 

Link to comment
  • Replies 4
  • Views 219
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

5 hours ago, MelindaMellukas said:

Site URL: https://cinnamon-chameleon-6wa9.squarespace.com/

Hi, I managed to change in estonian version nicely but english version it changes all the time to "Kontakt" to "Contact" visbily:

https://cinnamon-chameleon-6wa9.squarespace.com/en/home

 

Code I used:

 /* ADD EXCLUSION NAV ITEMS */
  $('.exclude-me,.exclude-me a').addClass('exclude');
  $('.sqs-svg-icon--list a,.SocialLinks-link').addClass('exclude');
});
    $(document).ready(function(){
    $("body.body-en a.btn").html(function() { 
          return $(this).html().replace("Kontakt", "Contact");  
    });
  $("body.body-en a.btn").attr('href','/en/contact');
        });
</script>

 

 

I check it look good in English version. Have you solved it yet?

image.thumb.png.9f249c7dfe07db3369f1dae93641f688.png

Edited by bangank36

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. 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.