From the course: JavaScript: Enhancing the DOM
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Solution: Adding a feature
From the course: JavaScript: Enhancing the DOM
Solution: Adding a feature
(upbeat music) - [Instructor] As you can see it's working now. I can go ahead and add skills and then delete them as well, and also, it's no longer showing up on the experience and contact page. Here's why it's no longer showing up. Remember in the show section we were hiding all the sections. That's where you had the skills as well. My line 12 is grabbing the skills class list and removing the active class. The other thing I did, I implemented the skills.js. When the DOM content is loaded, I load all the skills and I also add the event handler to the form so that when it's submitted, it actually gets added. So let's have a quick look at load. So I'm doing a fetch to API skills, and then in there I'm grabbing the skills list, setting the innerHTML to clear. Otherwise, just going to append it every time again, and it gets really lengthy. Next, I'm creating some elements, for every skill I'm creating a list item, setting the skill to be the text content, but I'm also creating a button…
Contents
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Project overview1m 53s
-
(Locked)
Walkthrough the Node.js backend1m 40s
-
(Locked)
Showing sections2m 37s
-
(Locked)
Showing and adding experiences11m 6s
-
(Locked)
Adding and displaying contact information11m 32s
-
(Locked)
Challenge: Adding a feature1m 13s
-
(Locked)
Solution: Adding a feature1m 52s
-
(Locked)
-