Slider inside an accordion element

Hi there, I’m trying to put a slider inside accordion element, but it doesn’t work. Better, It works badly. You can see the slider in action on this page: https://www.zulberti.eu/operation/ click on the first accordion item “Campionamento acque di falda”, the click the navigation arrow, you’ll see the slider appears.

I have tried some css tweak, but without success. Can you help me?

Thank you very much

Hello Alessandro,

Thanks for writing in!

Accordion and Slider have dynamic height so it might not work together as expected. I also tried to add Revolution Slider in accordion element while the slider is showing up but sometimes it gives issues in sliding one slide to another. It shouldn’t work as expected as they have dynamic height.

If you would like to fix the issue then I suggest you to get in touch with a developer as proving support for the same falls outside the scope of support can offer.

Thanks for understanding.

Isn’t there any solution to put a slider inside an accordion element in x-theme? Without custom developing, I mean.

Thanks

Hello Alessandro,

Please understand that the slider needs to initialize before it can display the slides and the slide animations. If you insert it inside an accordion or tabbed content element that is not active, it cannot initialize upon page loading because the container of the slider is hidden. This is why it is not advisable to place any slider element inside the accordion or tabbed content element.

Hope this explains it briefly.

Ok thank you for the explanation.

Seems to be not a good idea, I’ll try to explain to my client. :smile:

Yes, basically any elements that calculate the heights of its container (e.g. slider, card, tab, map, accordion, etc) cannot be added inside tab or accordion element.

Thanks,

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.