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

Hi. You can use Accordion Block, instead of using code to add accordion

https://support.squarespace.com/hc/en-us/articles/4411581892749-Accordion-blocks

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.