Skip Navigation

[Resolved] When I use the accordian block doesn’t collapse properly.

This thread is resolved. Here is a description of the problem and solution.

Problem:
the user was using the accordion cell in Toolset layouts, and when the accordion is closed on the frontend, the styling was broken.

Solution:
It turns out that the user's theme is not compatible with Twitter Bootstrap styling, which is used by Toolset.
We'll need to enqueue the needed styles for the accordion and disable the bootstrap animation. Check this reply https://toolset.com/forums/topic/when-i-use-the-accordian-block-doesnt-collapse-properly/#post-1782471

This support ticket is created 3 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 4 replies, has 2 voices.

Last updated by dennisM-3 3 years, 7 months ago.

Assisted by: Jamal.

Author
Posts
#1781761
ACCORDIAN.jpg

I am trying to: add a accordion block.

Link to a page where the issue can be seen: hidden link

I expected to see: I expect the accordion tab information to collapse.

Instead, I got: When I collapse the accordion tab, the rest of the page moves up, but the tab information is still visible behind the rest of the page.

#1781777

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for contacting the Toolset support.

I am getting a 404 error on the provided URL. Check this screenshot hidden link

Or maybe, I need to login in order to view it. If that's the case, your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

#1781821

Hi Jamal,

I published the page. I'm not sure I know how to make a full back up. Here's the link to the page.

hidden link

#1782471

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you for your feedback.

Making a backup will depend on your hosting provider. Check this screenshot from a cPanel hosting environment hidden link
If you are unsure, ask your hosting provider to help you or provide the documentation on how to do it.
You can also use a WordPress plugin, such as UpdraftPlus, WP All In One Migration.

Regarding the provided page, It turns out that the required styles, from bootstrap, to implement the accordion are not loaded. I tried on the browser to load Bootstrap 3, but it breaks the design of the theme.
Then, I tried, to include only the styles needed for the Bootstrap accordion, which fixes the issue, but has another issue:

.collapse {
  display: none;
}
.collapse.in {
  display: block;
}

The other issue is, when closing the last open accordion, the section below the accordion jumps to its position before the accordion body content is hidden. This comes from the fact, that Bootstrap is using a delay before hiding the content of the accordion.
This can be fixed by adding the following snippet to your layout Javascript section:

jQuery(function($){
  $.support.transition = false;
})

And add the first CSS snippet to your layout CSS section.

If you still encounter any issues, please allow me temporary access to your website to check this closely. Your next reply will be private to let you share credentials safely.

#1788347

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.