Events

Events allow us to respond to use input like typing, clicking or moving the mouse somewhere.

Just hover your mouse cursor over this sentence to see a mouseover event in action.

Resources

Videos

Mozilla Developer Network

Instructions

Read the instructions in topics/events.starter.js

1 — click

Click the button to show an alert

2 — mouse events

Hover over the square to color it

3 — preventing the default action

Click on the link and show the hidden message

Click here

Never gonna give you up 🎵.

4 — event Bubbling

Hover over a square to color it, without manually adding 4 events

5 — toggle checkbox

Show or hide the div#toggle based on checkbox selection

Hello 👋🏼