@MelvinAguilar
Posted
Hello, first of all, congratulations on completing this challenge!
I've reviewed your code and noticed a few things I'd like to highlight:
- The
<a>
tag is meant for links to direct users to another page or section of your website. However, you've used too many, and you shouldn't because clicking should performs an action. In such cases, it's better to use the <button> tag.
- Enclose both the icon and the text in a SINGLE
<button>
tag to avoid duplicating the open/close effect.
- A simpler way to approach this challenge is to use
<details>
and<summary>
, which allow you to achieve this without the need for JavaScript.
- Regarding the JavaScript code, I would suggest making the other element visible or invisible without modifying its height.
I hope you find it useful! ๐
Happy coding!
Marked as helpful
@MisterCcobD
Posted
@MelvinAguilar It is actually, wonderful! Thaks!