From the course: JavaScript: Events

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Creating DOM elements with events

Creating DOM elements with events - JavaScript Tutorial

From the course: JavaScript: Events

Start my 1-month free trial

Creating DOM elements with events

Now that we've got plenty of practice working with mouse click event, it's time to try a different event. This time we'll work with a related event called mouse over. And in the early days of the web, early or not, it's what people used to use to create roll overs. It's not as popular today as it used to be since today we use CSS for that, but it can still be useful for certain things. Here's a good way we could use it for our project. Since our previews are pretty tiny and they don't really show the entire image. When we roll over one of these, it would be nice to see a bigger version of the image. So we're going to go ahead and do that. Let me show you the HTML and CSS. You may be noticing that my cursor looks a little bit different when I roll over these. That's because of a CSS rule that I'll show you in just a bit. So if we take a look at our index file you'll see that it's pretty similar to the way that it used to except that we changed the H2 as well as the paragraph tag right…

Contents