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

Hover text – Show more text on right

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

Password: abc

Suppose you have 5 texts: Apple, Microsoft, Facebook, Instagram, and Google.
You want: when users hover on each text > show more text on the right side, something like this.

hover-text-show-more-text-on-right-01-min

#1. First, add a Text Block with 5 Paragraph, then add these URLs

  • Apple – #apple
  • Microsoft – #microsoft
  • Facebook – #facebook
  • Instagram – #instagram
  • Google – #google

and make sure the option “Open Link in new tab” is DISABLED.
(if you want to remove the Link Underline, I will provide the code in step #4)

hover-text-show-more-text-on-right-02-min\hover-text-show-more-text-on-right-03-min

hover-text-show-image-on-right-06

hover-text-show-image-on-right-07

hover-text-show-more-text-on-right-06-min

#2. Add 5 Text Blocks on the right side (You can drag them to make them overlap together then, or keep the current position if you want).

hover-text-show-more-text-on-right-02-min

 

#3. Install Squarespace ID Finder tool (Free)

hover-text-show-more-text-on-right-08-min

Then, you can find the ID of the Left Text Block and 5 Text Blocks on the right with the tool. In this example, we will have:

  • Apple: #block-yui_3_17_2_1_1709172012907_25285
  • Microsoft: #block-yui_3_17_2_1_1709172012907_26049
  • Facebook: #block-yui_3_17_2_1_1709172012907_27013
  • Instagram: #block-yui_3_17_2_1_1709172012907_28082
  • Google: div#block-yui_3_17_2_1_1709172012907_29250

hover-text-show-more-text-on-right-03-min

#4. Use this code to Code Injection – Footer or Page Header Code Injection (the page where you added 6 Text Blocks)

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
  // Apple
  $("#block-yui_3_17_2_1_1709172012907_25285").closest('.fe-block').addClass('apple show');
  $('a[href="#apple"]').addClass('active-link');
  // Microsoft
$("#block-yui_3_17_2_1_1709172012907_26049").closest('.fe-block').addClass('microsoft');
  // Facebook
$("#block-yui_3_17_2_1_1709172012907_27013").closest('.fe-block').addClass('facebook');
  // Instagram
$("#block-yui_3_17_2_1_1709172012907_28082").closest('.fe-block').addClass('instagram');
  // Google
$("div#block-yui_3_17_2_1_1709172012907_29250").closest('.fe-block').addClass('google');
  
  // Apple
  $('a[href="#apple"]').hover(function(){
    $(".apple").addClass("show");
    $('.fe-block:not(.apple)').removeClass('show');
    $(this).addClass('active-link');
    $('a:not([href="#apple"])').removeClass('active-link');
    }
  );
// Microsoft
 $('a[href="#microsoft"]').hover(function(){
   $(".microsoft").addClass("show");
    $('.fe-block:not(.microsoft)').removeClass('show');
   $(this).addClass('active-link');
    $('a:not([href="#microsoft"])').removeClass('active-link');
    }
  );
// Facebook
 $('a[href="#facebook"]').hover(function(){
   $(".facebook").addClass("show");
    $('.fe-block:not(.facebook)').removeClass('show');
   $(this).addClass('active-link');
    $('a:not([href="#facebook"])').removeClass('active-link');
    }
  );
// Instagram
 $('a[href="#instagram"]').hover(function(){
   $(".instagram").addClass("show");
    $('.fe-block:not(.instagram)').removeClass('show');
   $(this).addClass('active-link');
    $('a:not([href="#instagram"])').removeClass('active-link');
    }
  );
// Google
 $('a[href="#google"]').hover(function(){
   $(".google").addClass("show");
    $('.fe-block:not(.google)').removeClass('show');
   $(this).addClass('active-link');
    $('a:not([href="#google"])').removeClass('active-link');
    }
  );
});
</script>
<style>
.apple .html-block, .microsoft .html-block, .facebook .html-block, .instagram .html-block, .google .html-block {
    display: none;
}
  .show .html-block {
      display: block !important;   }
  .show {
      z-index: 999999 !important;
  }
  .active-link, .active-link * {
  color: #f1f !important;
  }
</style>

hover-text-show-more-text-on-right-09-min

#5. Explain

hover-text-show-more-text-on-right-10-min

hover-text-show-more-text-on-right-11-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