This is a simple and responsive accordion component built using HTML, CSS, and JavaScript. The accordion allows users to toggle between different sections by clicking on the headers.
- Simple and lightweight
- Responsive design
- Smooth open/close animations
- Uses pure JavaScript (no libraries required)
π project-folder
βββ π index.html # Main HTML file
βββ π style.css # CSS for styling
βββ π script.js # JavaScript for accordion functionality
- Clone the repository:
git clone https://github.com/docode537/simple-accordion-using-css-and-js.git
- Open
index.html
in your browser.
- Clicking on an accordion header expands the content below it.
- Clicking again or selecting another tab closes the previously opened section.
- Smooth CSS transitions for better user experience.
Watch the tutorial video: Link.
π Website: DoCode
π¦ blog post: Blog Post
π§ Email: docode537@gmail.com
Feel free to contribute or suggest improvements! π