Buy me a coffee

Click Image Show List Carousel

Demo: https://tuanphan-demo01.squarespace.com/click-image-show-list-carousel?noredirect

Password: abc

Description: Click Image >> Show List Carousel

#1. Add an Image and insert the URL:

  • #list-carousel

Make sure the option “Open link in New Tab” is disabled

Image List Section 01 MinAnd a List Carousel below

Image List Section 02 Min#2. Install Squarespace ID Finder to find the ID of List Carousel (under Image)

In my example, we will have:

  • Image Block: No need to find ID
  • List Carousel: section[data-section-id=”6670e53644d91f34284c07db”]

Image List Section 03 Min#3. Use this 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(){  
  // List Carousel
  $('a[href="#list-carousel"]').click(function(){
    $('section[data-section-id="6670e53644d91f34284c07db"]').addClass("show");
    $('section:not([data-section-id="6670e53644d91f34284c07db"])').removeClass('show');
    }
  );
});
</script>
<style>
section[data-section-id="6670e53644d91f34284c07db"] {
    display: none;
  transition: all 0.5s;
}
  section.show {
      display: block !important;
    transition: all 0.5s;
  }
</style>

Image List Section 04 Min#4. Explain code

Image List Section 05 Min