Toggle the visibility of content across your project with a few classes and our JavaScript plugins.
Click the buttons below to show and hide another element via class changes:
.collapse
hides content.collapsing
is applied during transitions
.collapse.show
shows contentYou can use a link with the href
attribute, or a button
with the data-bs-target
attribute. In both cases, the data-bs-toggle="collapse"
is required.
A <button>
or <a>
can show and hide multiple elements by referencing
them with a JQuery selector in its href
or data-bs-target
attribute. Multiple <button>
or <a>
can show and hide an element
if they each reference it with their href
or data-bs-target
attribute