The 2.5 Ways to Handle Web Events

By Chris Coyier on

How many ways are there to add an event (like a click) to an element? Andrea Giammarchi covers them. The first two are basically the same (hence the “2.5” in the title). I’d say the vast majority of event handling is through addEventListener, but the clearly listed advantages/disadvantages Andrea goes through are worth understanding. The […]

Dispatching an Event

By Chris Coyier on

Sometimes when crafting up some quick interactive vanilla JavaScript, I add an event listener and write the functionality I want to happen right there. For example, here’s a super basic character counter: Totally works. But, you won’t see any character count until you start typing something. That’s probably not ideal. It should count the characters […]

Did you know?

Frontend Masters Donates to open source projects. $363,806 contributed to date.