Accordions are contents of a website that are arranged in a list manner which can be toggled from being hidden or visible.
In jQuery, we use the accordion
method on a wrapping div
to achieve this.
div
using its ID that wraps the accordion, and we call the jQuery accordion()
.div
and give it an ID of accord
.<h3>
to start the first accordion under which we use a div
to wrap a p
tag containing the content of the accordion.Accord2
and Accord3
.