From the course: JavaScript: Enhancing the DOM

Unlock the full course today

Join today to access over 24,000 courses taught by industry experts.

Solution: DOM detective

Solution: DOM detective

(upbeat music) - [Instructor] Great job on attempting the challenge. Let's walk through the solution. First, you're going to open the dev tools. To find an element, you can use the search feature pressing control F and starting to type. And if you were to search for Yoda and walk through a little bit, you would find something that would be one approach. You would then find this class animal dog, and you could see that dog is set to display none. So we could toggle this and then ta-da, it is revealed. There's also an alternative way that would be to go ahead and just open up the elements and walk through and see what we can find. In this way we would also go ahead and find, I'm Yoda the dog right here. We could click on it and see that the class dog is set to display none. We could then go ahead and toggle it and reveal Yoda. See how easy it is to locate elements? This skill is fundamental in web development for both analyzing and debugging. And that's it for introduction to the DOM…

Contents