Hostinicon
GET HOSTING FROM $3.95/MO PLUS A FREE YEAR ON TUTS+ (RRP $180). HURRY OFFER LIMITED. Check it out
Advertisement

JavaScript from Null: Cross-Browser Event Binding

by
Gift

Get a free year on Tuts+ this month when you purchase a Siteground hosting plan from $3.95/mo

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.

Advertisement