Jump to content

Code Block Button with Pop-Up Window

Recommended Posts

Sharing this - hopefully it saves someone some time.

Here's a code block to create a button that opens an external website as a pop-up - just replace cnn.com with the site you want to appear in the pop-up.

<center>
  <div class="sqs-block button-block sqs-block-button"><div class="sqs-block-content">

 <div class="sqs-block-button-container--center preFlex flexIn" data-animation-role="button" data-alignment="center" data-button-size="medium" style="transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1); transition-duration: 0.65s;">
    <a href="https://cnn.com" class="sqs-block-button-element--medium sqs-block-button-element" data-initialized="true"
  target="popup" 
  onclick="window.open('https://www.cnn.com','popup','width=600,height=600,scrollbars=no,resizable=no'); return false;"> 
    This is CNN
</a>
</div>
</center>

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.