You can send your questions to my email to get faster answer in 24 hours (free).
Buy me a coffee

Click button – Show Video

Demo: https://tuanphan3.squarespace.com/click-button-show-video?noredirect
Password: abc

Suppose you have 4 buttons (left) – 4 videos (right).
When clicking on each button, will show corresponding videos on the right.
You can follow these steps:
#1. First, add 4 Button Blocks and 4 Videos

click-button-show-video-01-min

#2. Edit 4 Button Blocks, and use these URLs

  • #apple
  • #microsoft
  • #instagram
  • #google

and make sure the option “Open Link in New Tab” is disabled.

click-button-show-video-02-min

click-button-show-video-03-min

click-button-show-video-04-min

click-button-show-video-05-min

#3. Install Squarespace ID Finder to find the ID of Videos

In my example, we will have:

  • Apple video: #block-732e624b177ec3a83b6f
  • Microsoft video: #block-a5fea4b81434f2b85321
  • Instagram video: #block-c102931f3c45b5a452c2
  • Google video: #block-e71c8b0bee39e662e11f

click-button-show-video-06-min

#4. Use code to Code Injection – Footer (or Page Header Code Injection)

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
  // Apple
  $("#block-732e624b177ec3a83b6f").closest('.fe-block').addClass('apple show');
  // Microsoft
$("#block-a5fea4b81434f2b85321").closest('.fe-block').addClass('microsoft');
  // Instagram
$("#block-c102931f3c45b5a452c2").closest('.fe-block').addClass('instagram');
  // Google
$("#block-e71c8b0bee39e662e11f").closest('.fe-block').addClass('google');
  
  // Apple
  $('a[href="#apple"]').click(function(){
    $(".apple").addClass("show");
    $('.fe-block:not(.apple)').removeClass('show');
    }
  );
// Microsoft
 $('a[href="#microsoft"]').click(function(){
   $(".microsoft").addClass("show");
    $('.fe-block:not(.microsoft)').removeClass('show');
    }
  );
  // Instagram
 $('a[href="#instagram"]').click(function(){
   $(".instagram").addClass("show");
    $('.fe-block:not(.instagram)').removeClass('show');
    }
  );
  // Google
   $('a[href="#google"]').click(function(){
   $(".google").addClass("show");
    $('.fe-block:not(.google)').removeClass('show');
    }
  );
});
</script>
<style>
.apple .video-block, .microsoft .form-block, .instagram .video-block, .google .video-block {
    display: none;
}
  .show .video-block {
      display: block !important;
  }
  .show {
      z-index: 999999 !important;
  }
</style>

click-button-show-video-07-min

Ask me a question, free

If your site is private or in trial, just setup password and share url. See how to: https://beaverhero.com/squarespace-how-to/
Please check your email carefully. Recently I got a lot of questions with wrong emails.

If you haven't heard from me within 24 hours please check your junk/spam folder