In today’s class, students will learn how to add event listeners to a DOM element, cancel default events, and stop event propogation. Students will also store information on HTML elements using data attributes.
By the end of class students will be able to:
Handle click events by using addEventListener()
.
Prevent default behavior by using event.preventDefault()
.
Stop the propagation of events by using event.stopPropagation()
.
Work with keyboard events keyup
and keydown
.
Store information on HTML elements by using data attributes.