A good enough addEvent
O HAI, this blog is nearly dead these days. But before it truly shuffles off into the sunset, allow me to point you to filosofo's "good enough" addEvent. Austin gets around PPK's pesky requirements by ignoring one of them (namely, having a corresponding removeEvent).
I love this solution because it mirrors much of my recent experiences with JavaScript. Honestly, I can't remember the last time I needed anything more than some variation of toggle() and I can count on one hand the number of times I've need to detach an event since 1998.
Kudos to Austin for thinking differently.
3 Comments:
hye,
ooppss..nearly dead...?
hope u are doing best to maintain this site.
this site is great.
Tips,Tricks and Practice
yup.. page with PR8, nearly dead.. sad..
Free advice for salt free water softener
http://www.quirksmode.org/blog/archives/2007/11/media_ajax_1.html
I like this one... the infinitely recursive memory bzorch if you use this peticular version is especially fun.
Post a Comment
<< Home