Collapse depending on screen size

Hi guys,
(sorry in advance for my english)

I have an accordion that has collapsed cards by default in all screen sizes.
I was wondering if I could put a class to not-collapsed on small sizes (tablet and mobile version) without having to duplicate the code.

Thanks in advance!

1 Like
  1. Add a Browser component to the document.
  2. For each div.collapse add a dynamic Collapse Show when the browser.viewport.width is less than 900 (or similar)

the code should finish up looking like

<div id="accordion1_collapseThree" class="collapse" is="dmx-bs5-collapse" aria-labelledby="accordion1_headingThree" data-bs-parent="#accordion1" dmx-bind:show="(browser1.viewport.width < 900)">

Your English is perfect!

4 Likes

Thank you so much sir!!
It worked perfectly!!!

1 Like