tuanphan Posted August 11 Share Posted August 11 Description: Hover on each text will show corresponding Summary Block. If you can't make code work, you can send link to page where you use Summary Block, I will check again. #1. First, you add a Text Block with some text/url. #summary01 #summary02 Make sure the option “Open link in new tab” is disabled and add 2 Summary Blocks under. #2. Find ID of Summary Blocks, Text Block. Use below tool. In my example, it is Left Summary Block: #block-yui_3_17_2_1_1715250113016_8728 Right Summary Block: #block-yui_3_17_2_1_1715250113016_10233 #3. Use this code to Code Injection > Footer (or Individual Page Header Injection, page where you use Summary Block) <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> <script> $(document).ready(function(){ // Summary 01 $("#block-yui_3_17_2_1_1715250113016_8728").closest('.fe-block').addClass('summary01 show'); // Summary 02 $("#block-yui_3_17_2_1_1715250113016_10233").closest('.fe-block').addClass('summary02'); // Summary 01 $('a[href="#summary01"]').hover(function(){ $(".summary01").addClass("show"); $('.fe-block:not(.summary01)').removeClass('show'); $(this).addClass('active-link'); $('a:not([href="#summary01"])').removeClass('active-link'); } ); // Summary 02 $('a[href="#summary02"]').hover(function(){ $(".summary02").addClass("show"); $('.fe-block:not(.summary02)').removeClass('show'); $(this).addClass('active-link'); $('a:not([href="#summary02"])').removeClass('active-link'); } ); }); </script> <style> .summary01 .summary-v2-block, .summary02 .summary-v2-block { display: none; } .show .summary-v2-block { display: block !important; } .show { z-index: 999999 !important; } .active-link { color: #f1f !important; } </style> #4. Explain code 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment