Accordion advice!

Hi all,

I have styled my accordion and want to use the exact same way lower down on the same page.

I duplicated the bric - and changed the content - the 2nd accordion on opening = throws me right to the bottom of the screen instead to the open section.

I take it this is because of the settings are duplicated ? So can you advise me of the simplest way to ensure this works smooth - what are the properties I need to change.
I need to add an extra section but this opens 2 at the same time! So need to manually change this too

Thanks all!

You’ll need to give the DIV container a unique ID:
2021-09-21_05-52-57 (1)

From here you will need to adjust the custom attributes with the same ID:
2021-09-21_05-52-57 (2)

As my 2 cents: adding a class to each accordion with all custom setting would be much easier.

1 Like

Thanks @Jerry - just made those changes, all good. One thing I was doing wrong which I totally missed out was the item number !..when i clicked on one of them 2 would open ! thats sorted now.

One issue I am having is I have an accordion and when opening the 2nd or 3rd one - it pushes me straight to the bottom of the page still shooting past 2 blocs ! I need to scroll back up to see the content, not sure if you or anyone else has ever had this?

Agree with @Jerry if you target your classes properly, you only have to add one class to an accordion to style the whole thing. Then it’s really easy to add another accordion.

1 Like

Hi @Malachiman & @Jerry

Thanks for your messages. Yeah I have classes, those are all fine - I have a lot of other detail in the whole bloc which needed duplicating, so was easier just to duplicate.

I have done it all separate now, but simplified the blocs as the client wants the extra sections in another area now.

One issue I am still getting - in the Accordion I have a lot of content on the middle (2) section of the 3 and when I click on the 3rd one - it fires straight to the bottom of the page each time.

I have tried it with a fresh project to test and it seems to be a bug in it - @Norm have you noticed this within Accordion?..is there anything I can do that when I open a section, if brings it to the top of the section each time so the old one closes and the new section starts at the top. Seems to be all over the place, at the moment it fires it straight to the bottom of the page ! 2 blocs away from the accordion.

Thanks all

Hi all,

Anyone know with accordion - what code would I need to use to make it so when I click on an accordion section it opens and starts at the top of the one I’m opening (as it should) when I have large content.

There seems to be a bug if you have large content - you open the next one down and it throws you down the page! Spoke to @Malachiman and he’s right that on testing again tonight - large content seems to make it a poor choice to use and will try to use Tab Anything instead moving forward.

I’ve noticed on accordions I’ve used on other builders seems to have a slight delay - like a soft close on the open one & then the one clicked opens - to make it behave right - not sure if this can be applied in Blocs?

I’ll have a look again tomorrow!
@Norm - is this something that can be looked into do you know? Cheers

Thats not a bug as such, its how it works. If you collapse a card above content, the content below moves up.

Hi Pete,

Thanks for the reply.

So it’s a bootstrap design (or issue) then.

How does it work with blocs then - will accordion have to stay like that until bootstrap make a change? Or can this be made better in blocs?

It’s not the best to be fair - used the same text on other builders to see how they work and it’s fine, just the blocs one I have an issue with.

If it’s like this on large content - is it worth accordion restricting characters before ?

They are obviously doing something to scroll the content, or keeping it within a fixed length container. Or keeping the tabs open with others are opened.

The bootstrap examples work fine, until you have content that’s longer than the view port.

1 Like

Why not set a fixed height for the card-body and set overflow to scroll? Just my 2 cents.

1 Like

Hi ya,

Thanks for the post - I will have a look at this and send to them, - but they do want it to fully open.

They have emailed again tonight saying they need it changed ASAP - so will try to find some code to make it do what its supposed to do.

Hi all,

I have found this page on the issue I have - anyone able to offer advice where to use this !?..i need my accordion to open and have it so it starts at the top of the one that is open - seems to be a huge issue reading various forums - but not sure how to bring this into Blocs.

Here is a scroll to top page - but not a clue how to make it work !

Well, read the page carefully. Pick the right script for the bootstrap version you’re using. Copy/Paste the script into the project / page header and your magic happens.
Kapture 2021-09-27 at 06.16.27