In this project, I will show you how to build an FAQ Accordion component using HTML, CSS & JavaScript.
00:00 Intro
00:32 Fetching the data
03:27 Adding widget container to page
08:55 Making FAQ Items
16:11 Styling
23:45 Button toggle
24:50 Connecting data
So it's quite a fun project to build expanding panels in JavaScript or an accordion-type widget and we'll be doing that in this JavaScript tutorial.
We'll be recreating an FAQ accordion widget inside of an existing web page by creating all of the HTML elements dynamically with our JavaScript and then creating CSS styles which match the theme of the existing site.
The widget itself is quite cool because instead of using hard-coded data, we'll fetch the data using the JavaScript Fetch API thereby simulating a network request for the data.
In this way, we can make sure the data is dynamic (or we could choose a different source) to populate the FAQ Accordion widget.
This will also help prepare you for working with network data in your JavaScript projects and also introduce you to promises if you've never used them before.
#javascript #javascriptproject #javascriptbeginners Channel Handle @codebubb