Interactive-Design-and-Technology / interactive-learning

Generate Interactive Learning Activities for your LMS using JavaScript.
https://interactive-design-and-technology.github.io/interactive-learning/
0 stars 2 forks source link

Expandable Content aka Accordion #17

Closed FeXd closed 1 year ago

FeXd commented 1 year ago

Create a simple webpage using basic HTML, CSS, and JavaScript, that allows us to have a "Expandable Content" activity.

Example of existing activities are available in /source directory, specifically:

Please refer to #1 and #2 for more examples.

Implementation

Expectations

FeXd commented 1 year ago

The current example listed above look likes this:

Image

This type of interface is also known as the accordion and there should be a lot of tutorials online for getting this done. The idea for us would be that the "Box Title" would be a question, and the answer would be placed inside the "Description Text Here" area.

Some possible tutorials:

It is possible that this could be done without any JavaScript, but I would prefer it ran off of JavaScript objects / JSON like the other examples. So the JavaScript might just be for generating, and not the actual show / hide functionality.

Raunaq27 commented 1 year ago

This how it looks at the moment

Image