tuanphan Posted September 21 Posted September 21 If you can't make it work, you can send site url + exact code you added to your site, I can check easier. Description: Hover text, replace it with a logo Demo: https://tuanphan3.squarespace.com/hover-client-name-show-logo-1?noredirect Pass: abc Suppose you have 5 client texts: Apple, Microsoft, Facebook, Instagram, and Google. You want: when users hover on each client text > show a logo over + hide text, something like this. #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 need to remove underline under text, you can comment below, I will give the code #2. Add 5 Image Blocks over the Text Block (You can drag them to make a nice position). In my example, I added these. #3. Find ID of 5 Image Blocks In my example, we will have: Text Block: #block-yui_3_17_2_1_1709302191320_24592 Apple: #block-yui_3_17_2_1_1709302191320_26267 Microsoft: #block-yui_3_17_2_1_1709302191320_26851 Facebook: #block-yui_3_17_2_1_1709302191320_27989 Instagram: #block-yui_3_17_2_1_1709302191320_27419 Google: #block-yui_3_17_2_1_1709302191320_28558 #4. Use this code to Code Injection Footer (or Page Header Injection) <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_1709302191320_24592 a[href="#apple"]').hover(function(){ $("#block-yui_3_17_2_1_1709302191320_26267").addClass("show"); $(this).css('opacity','0'); }, function(){ $('#block-yui_3_17_2_1_1709302191320_26267').removeClass("show"); $(this).css('opacity','1'); } ); // Microsoft $('#block-yui_3_17_2_1_1709302191320_24592 a[href="#microsoft"]').hover(function(){ $("#block-yui_3_17_2_1_1709302191320_26851").addClass("show"); $(this).css('opacity','0'); }, function(){ $('#block-yui_3_17_2_1_1709302191320_26851').removeClass("show"); $(this).css('opacity','1'); } ); // Facebook $('#block-yui_3_17_2_1_1709302191320_24592 a[href="#facebook"]').hover(function(){ $("#block-yui_3_17_2_1_1709302191320_27989").addClass("show"); $(this).css('opacity','0'); }, function(){ $('#block-yui_3_17_2_1_1709302191320_27989').removeClass("show"); $(this).css('opacity','1'); } ); // Instagram $('#block-yui_3_17_2_1_1709302191320_24592 a[href="#instagram"]').hover(function(){ $("#block-yui_3_17_2_1_1709302191320_27419").addClass("show"); $(this).css('opacity','0'); }, function(){ $('#block-yui_3_17_2_1_1709302191320_27419').removeClass("show"); $(this).css('opacity','1'); } ); // Google $('#block-yui_3_17_2_1_1709302191320_24592 a[href="#google"]').hover(function(){ $("#block-yui_3_17_2_1_1709302191320_28558").addClass("show"); $(this).css('opacity','0'); }, function(){ $('#block-yui_3_17_2_1_1709302191320_28558').removeClass("show"); $(this).css('opacity','1'); } ); }); </script> <style> #block-yui_3_17_2_1_1709302191320_28558, #block-yui_3_17_2_1_1709302191320_27419, #block-yui_3_17_2_1_1709302191320_27989, #block-yui_3_17_2_1_1709302191320_26851, #block-yui_3_17_2_1_1709302191320_26267 { opacity: 0; transition: all 0.1s ease; } .show { opacity: 1 !important; transition: all 0.1s ease; } </style> #5. Explain a bit 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!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment