Responsive accordion with basic dom manipulation
Design comparison
Solution retrospective
this is my first time learning dom manipulation, i still confuse how to selecting multiple element with the same tag. so my first try is just make all the element i want to choose assign it with id.
What challenges did you encounter, and how did you overcome them?i still dont know how to implement the background image. maybe you guys can help for the html stucture or the styling.
What specific areas of your project would you like help with?n/a.
Community feedback
- @rohankhan5655Posted 3 months ago
Well hopefully you was using this way to access html element
Let button = document.getElementbyId("button");
But, Now most of developers do not use this. Way to access html element. Use this ( recommended)Let button = document.querySelector(".button");
.button if Class other-wise # for id To access all element use thisLet p = document.querySelectorAll("p");
THAT CODE WILL BE ACCESS ON All P Tag Element
For more info kindly search on Google javascript queryselectors, For better understanding
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord