Add the .js-collapse class to clickable element,
with the data-collapse-target attribute set as the id of the element you want to toggle.
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium,
totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae
dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, s
ed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.
When the target element is clicked, the .active class is toggled. If the element being clicked
is an <a> tag, event.preventDefault(); is called on the click event.
This allows you to use <a> tags as click target without needing to worry about stopping the click event.
Options
You can also specify the animation speed and the animation easing function as data attributes.
data-collapse-speed defines the animation speed in milliseconds, while data-collapse-easing defines
the animation easing via a valid CSS easing property.
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium,
totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae
dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, s
ed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.