The existing app uses jQuery to specify event handlers. In this video, replace the jQuery event handler code with event listeners.
Then we're going to type a dot,…and we're going to specify the add event listener method…for the selected element.…In the parens,…we need to specify three arguments.…So first, we're going to specify a string…that indicates the event to listen for.…For this button, that event is click.…Then a comma, and then the second argument,…and that's a function or a function call.…So in this case, we're going to use an anonymous function.…
We already have this in place for the jquery click method,…and so we can just type function,…
- Replacing jQuery Ajax requests with Fetch requests
- Implementing data binding
- Replacing simple animations
- Ensuring backwards compatibility