Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Open a specific Squarespace social link in same tab


lieslmaduro
Go to solution Solved by paul2009,

Question

  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Posted Images

2 answers to this question

Recommended Posts

  • 1
14 minutes ago, lieslmaduro said:

It targets all social links (not only the search icon link) 

If you only want your code to apply to the /search link, you could simply change it to:

$(function(){ $('a[href$="/search"]').attr('target', '_self'); });

 

sf-digital-signature-logo-email145.png.46606a2288a2847f44d81b9b7b58f3a5.png
Hi, I'm Paul, founder of SF Digital, a specialist company helping Squarespace users by building the features that Squarespace didn't include.
Explore our range of Squarespace Extensions, including the Wishlist, and Datepicker Extension or book a Squarespace Expert for 1:1 help. Note that links in my posts may be affiliate links.

Link to post
  • 0

So far, this is what I've come up with. But it targets all social links (not only the search icon link) 

<script>

$(function(){ $('[target]').attr('target', '_self'); });

</script>

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...