64x64 icon dark hosting
Deploy New Relic now and get $135 off your Tuts+ subscription.

JavaScript from Null: Cross-Browser Event Binding

This post is part of a series called Javascript from Null.
JavaScript from Null: Chapter 5 – Events
JavaScript from Null: Utility Functions and Debugging

In chapter five of this series, we jumped into the muddy world of event listeners. In that episode, we only got our feet wet; however, today, we’ll take things a step further as we implement a far more efficient solution. Along the way, we’ll learn a plethora of new techniques.

Full Screencast

Our Final Code

Please note that this code is slightly revised, based upon some excellent feedback in the comments section.