Speeding up object detection by doing the detection once. Dean Edwards demonstrates a quick improvement using the ubiquitous addEvent function.
Dean Edwards presents his improvement to Scott Andrews' famous addEvent()
functions. Solving the cross-browser this
reference differences, and passing event
objects correctly.