Open Popup Widget when clicking Squarespace Header Button

(Post contains referral link)
In this post, I will share a tip to active Popup Widget when clicking on a Squarespace Header Button.

If you have installed Popup Widget, you will see that the widget provides an ID option in the Trigger, you can activate the widget when users click on this ID.


First, add this code to Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
	$('a.btn').attr('id','popup');
});
</script>

Next, you can enter this to HTML Element ID
image

(I tested this on my SS 7.1 site. I haven’t tested with SS 7.0 site yet)

2 Likes