What we'll build


show more What we'll build provides you with in-depth training on Developer. Taught by Ray Villalobos as part of the JavaScript: Enhancing the DOM show less
please wait ...

What we'll build

So, in the next series of movies, we're going to be building a very simple dom related project. We're going to be going to the artist page, and if you scroll down a little bit, there's a list of artwork from these artists that are in the show. If you click on it, this is going to pull an overlay which grays out the background. And then an image. This same image is going to resize vertically or horizontally, depending on its dimensions. This is a seemingly simple task, but it requires quite a bit of JavaScript to get it right. So, if we take a look at the finished version of this code. You can see that the HTML is pretty simple.

Scroll down here and you'll see that assisted list of images with an image tag inside each one of those list items. Now, in the JavaScript, you can see that what we're doing is selecting a specific node of this document's dom. And then adding an event listener that waits for a click inside this node. We could have added an on...

What we'll build
Video duration: 2m 16s 2h 3m Intermediate

Viewers:

What we'll build provides you with in-depth training on Developer. Taught by Ray Villalobos as part of the JavaScript: Enhancing the DOM

Subjects:
Developer Web
Software:
HTML JavaScript
Author:
please wait ...