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

Hover Image Show Image

Demo: https://tuanphan-demo01.squarespace.com/hover-image-show-image?noredirect

Password: abc

Suppose you have 2 images, and you want to hover over an image, the rest will appear.

#1. First, add 2 Image Blocks.

Hover Image Show Image 01 Min

#2.  Edit the Left Image Block and add this URL:

  • #image01

Make sure “Open Link in New Tab” is disabled

Hover Image Show Image 03 Min

#2. Install Squarespace ID Finder to find the ID of Image Blocks

In my example, we will have:

  • Left Image: No need to find ID
  • Right Image: #block-yui_3_17_2_1_1714008816100_8348

Hover Image Show Image 02 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(){
  $('a[href="#image01"]').hover(function(){
   $("#block-yui_3_17_2_1_1714008816100_8348").addClass("show");
  }, function(){
   $("#block-yui_3_17_2_1_1714008816100_8348").removeClass("show");
  })
  });
</script>
<style>
#block-yui_3_17_2_1_1714008816100_8348 {
    display: none;
}
  .show {
      display: block !important;
  }
  .show {
      z-index: 999999 !important;
  }
</style>

Hover Image Show Image 04 Min

#4. Explain code

 

Hover Image Show Image 05 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