Wednesday, April 16, 2008

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:

At 3:15 AM, Blogger Nick Syam said...

hye,

ooppss..nearly dead...?
hope u are doing best to maintain this site.
this site is great.

Tips,Tricks and Practice

 
At 7:41 PM, Blogger SENANG AJE said...

yup.. page with PR8, nearly dead.. sad..

Free advice for salt free water softener

 
At 7:01 PM, Blogger Electro said...

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