Jump to content

crevice

Member
  • Posts

    8
  • Joined

  • Last visited

Community Answers

  1. crevice's post in change target attribute of link was marked as the answer   
    Yes thanks for that, I've managed to get it working:
    window.addEventListener('DOMContentLoaded', () => { changeTarget = (link) => { link.setAttribute('target', '_self'); } const selector = '[href="https://www.johncervantes.co.uk/instagram"]'; const instaLink = document.querySelectorAll(selector); instaLink.forEach(changeTarget) }); And I'll wrap in the DOMContentLoaded if I need to add anything in the future.
×
×
  • 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.