Jump to content

Hover on Fixed Section

Recommended Posts

  • Replies 6
  • Views 239
  • Created
  • Last Reply

Top Posters In This Topic

You have 22 links, so you will need 22 Image Blocks

Because you have 1 image block only, so you can use this code. Code will work with first link Jerry Adams only

Add to Settings > Advanced > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script>
  $(document).ready(function(){
// Jerrry J Adams
  $('.fe-block-751b927d69a6874ab9f2 p:nth-child(1) a').hover(function(){
    $(".fe-block-bd5063a863d9fd084227").addClass("show");
    }, function(){
    $('.fe-block-bd5063a863d9fd084227').removeClass("show");
    }
  );
});
</script>
<style>
  .fe-block-bd5063a863d9fd084227 {
  opacity: 0;
  transition: all 0.5s ease;
  }
  .show {
  	opacity: 1 !important;
     transition: all 0.5s ease;
  }
</style>

See video: https://www.loom.com/share/b24c8b0ea8d54791942f7a08dde24425

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Thank you! I see how that is working.

So in order to repeat this for each artist, I should create new image blocks on that page?

Also, my goal is to have one image always showing by default. When you visit the "artists" page, there will be an image already highlighted.

How can I have one image always showing and then the other images replace it as you hover over other names?

I appreciate your time!

 

Link to comment
On 3/12/2023 at 4:30 AM, sofinodesign said:

Thank you! I see how that is working.

So in order to repeat this for each artist, I should create new image blocks on that page?

Also, my goal is to have one image always showing by default. When you visit the "artists" page, there will be an image already highlighted.

How can I have one image always showing and then the other images replace it as you hover over other names?

I appreciate your time!

 

Yes. You need to add all images, then I can give new code

When you add all, I can adjust code to make first image always show on initial

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.