dcbachar Posted March 13, 2022 Share Posted March 13, 2022 Site URL: https://dylansoffice.com/team When someone clicks Information on the site, a markdown/dropdown accordion animation occurs to reveal more text. How do I eliminate the accordion animation? I'd just like the text to appear or pop-up immediately after clicking Information. I currently have this code pasted into the page header code injection: <script> $(document).ready(function(){ $('.markdown-block .sqs-block-content h4').addClass('ui-closed').css('cursor','pointer'); $(".markdown-block .sqs-block-content h4").nextUntil("h4").slideToggle(); $(".markdown-block .sqs-block-content h4").click(function() { $(this).nextUntil("h4").slideToggle(); $(this).toggleClass('ui-closed ui-open'); }); }); </script> Link to comment
tuanphan Posted March 14, 2022 Share Posted March 14, 2022 Hi. You can use Accordion Block, instead of using code to add accordion https://support.squarespace.com/hc/en-us/articles/4411581892749-Accordion-blocks dcbachar 1 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
dcbachar Posted March 14, 2022 Author Share Posted March 14, 2022 Okay, that works. Can I remove the "+" or "v" icon and have an underlined header instead? Link to comment
tuanphan Posted March 15, 2022 Share Posted March 15, 2022 15 hours ago, dcbachar said: Okay, that works. Can I remove the "+" or "v" icon and have an underlined header instead? Add this to Design > Custom CSS /* hide accordion plus arrow */ .accordion-block .plus { opacity: 0; } /* underline accordion title */ span.accordion-item__title { border-bottom: 1px solid black; display: inline-block; } 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
FTWSGEM Posted May 21 Share Posted May 21 On 3/15/2022 at 7:22 AM, tuanphan said: /* hide accordion plus arrow */ .accordion-block .plus { opacity: 0; } /* underline accordion title */ span.accordion-item__title { border-bottom: 1px solid black; display: inline-block; } Does this target all accordion blocks site-wide? Is it possible to only target a specific page? Link to comment
tuanphan Posted May 22 Share Posted May 22 23 hours ago, FTWSGEM said: Does this target all accordion blocks site-wide? Is it possible to only target a specific page? Edit page > Add a Code Block at bottom of page > Paste this code <style> /* hide accordion plus arrow */ .accordion-block .plus { opacity: 0; } /* underline accordion title */ span.accordion-item__title { border-bottom: 1px solid black; display: inline-block; } </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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment