Any trick to disable the open/close animation of Collapse groups ?
To control (show/hide) the collapsible content, add the data-toggle="collapse" attribute to an <a> or a <button> element. Then add the data-target="#id" attribute to connect the button with the collapsible content (<div id="demo">).
Generally, we recommend using a button with the data-bs-target attribute. While not recommended from a semantic point of view, you can also use a link with the href attribute (and a role="button" ). In both cases, the data-bs-toggle="collapse" is required.
Just add data-toggle="collapse" and a data-target to the element to automatically assign control of one or more collapsible elements. The data-target attribute accepts a CSS selector to apply the collapse to. Be sure to add the class collapse to the collapsible element.
data-toggle = “collapse” It is used when you want to hide a section and make it appear only when a div is clicked. Say, the div is a button, so when the button is clicked, the section that you want to collapse appears and re-appears using the button. Example: HTML.
For Bootstrap 3 and 4 it's
.collapsing { -webkit-transition: none; transition: none; display: none; }
Bootstrap 2
CSS solution:.collapse { transition: height 0.01s; }
NB: setting transition: none
disables the collapse functionnality.
Bootstrap 4
solution:.collapsing { transition: none !important; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With