Jump to content

How can I display an open Accordion Block item by default?

Recommended Posts

14 minutes ago, usingmyhead said:

I'm wondering if anyone has some code that will show an item from the Squarespace Accordion Block as open by default? My client wants the first accordion item to be open when the page loads

This is a built-in feature 🙂

expand-first-accordion-item.thumb.jpg.36ef08b4c1d1a95092bfda12a5eeb2f0.jpg

About: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™. 
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!
If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.
Improve your online store with our extensions.

Link to comment

...and never more shocked than me to discover that something is built in and doesn't require code 😲

About: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™. 
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!
If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.
Improve your online store with our extensions.

Link to comment
6 hours ago, paul2009 said:

...and never more shocked than me to discover that something is built in and doesn't require code 😲

I would have started coding without even checking for sure... 🤦‍♂️

Freelance Squarespace developer making plugins like Full-Width Blocks, Hover effects for grid gallery and the Darkmode plugin. I know Squarespace inside out and I'm able to solve pretty much any Squarespace code problem.

Get in touch here!

Link to comment
  • 1 month later...
On 2/4/2022 at 10:06 AM, paul2009 said:

This is a built-in feature 🙂

expand-first-accordion-item.thumb.jpg.36ef08b4c1d1a95092bfda12a5eeb2f0.jpg

Any insight on how to set all accordion blocks to be opened at once?

 

I understand it would most likely take some javascript... Attempting to have a list layout on Desktop with each section always open, but then make it more mobile friendly aka accordion-functioning on mobile. Any thoughts?

Link to comment
On 3/23/2022 at 4:39 AM, MayaViolet said:

Any insight on how to set all accordion blocks to be opened at once?

 

I understand it would most likely take some javascript... Attempting to have a list layout on Desktop with each section always open, but then make it more mobile friendly aka accordion-functioning on mobile. Any thoughts?

Add to Design > Custom CSS

/* Accordion Block - Expand all items */
  .sqs-block-accordion .accordion-item__dropdown {
    display: block !important;
}

 

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.