Jump to content

Section Background Image Zoom Upon Hovering Button

Recommended Posts

  • Replies 5
  • Views 559
  • Created
  • Last Reply

Top Posters In This Topic

(This code for Photography)

Add to Last Line in Code Injection > Footer. This code won't work with PARALLAX feature.

<script>
  $('div#block-yui_3_17_2_1_1685501077192_12722 a').hover(function(){

      $('[data-section-id="6476b6d57c47b25e21b33735"]').addClass("show");  //Add the active class to the area is hovered
  }, function () {
      $('[data-section-id="6476b6d57c47b25e21b33735"]').removeClass("show");
  });
  
</script>
<style>
  .section-border img {
  	transition: all 0.3s;
  }
  .show .section-border img {
  	transition: all 0.3s;
    transform: scale(1.5);
  }
</style>

 

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
On 6/30/2023 at 3:17 AM, tuanphan said:

(This code for Photography)

Add to Last Line in Code Injection > Footer. This code won't work with PARALLAX feature.

<script>
  $('div#block-yui_3_17_2_1_1685501077192_12722 a').hover(function(){

      $('[data-section-id="6476b6d57c47b25e21b33735"]').addClass("show");  //Add the active class to the area is hovered
  }, function () {
      $('[data-section-id="6476b6d57c47b25e21b33735"]').removeClass("show");
  });
  
</script>
<style>
  .section-border img {
  	transition: all 0.3s;
  }
  .show .section-border img {
  	transition: all 0.3s;
    transform: scale(1.5);
  }
</style>

 

Awesome, thanks! Is there any way this can work with the parallax effect or do I have to pick between the two?

Edited by imdanielduncan
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.