Jump to content

How do I remove accordion animation?

Recommended Posts

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
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
  • 2 years later...
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
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

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.