Yehuda Katz schrieb: > Nope. None at all. It was my brain stuck in Ruby mode for hashes, > honestly. Just avoid "end" in JS ;-) > > There's some other good stuff in my code that optimizes things (I > don't define defaults for options that are only used once; In the best case, the client doesn't have to specify any options. > I use setTimeout to distinguish between synch and asynch calls). That is a very interesting idea. You assume that your timeout is called at the same time the animation finishes, because animations are time-based, right? > The only thing it *doesn't* do well is event delegation (because, > honestly, I'm waiting to see delegation brought into the core). I was > thinking about writing a delegate plugin while that's coming down the > pike, but maybe you'd want to abstract your code from accordion and do so? That is something we'd like to add in 1.1. I'm not sure how the right way to implement event delegation looks like. Basically it just uses the event's target property when handling the event and assigns the event listener to some parent element. In my accordion implementation, I assigned the listener to the definition list. On the other hand, you could as well assign it to the document object, reducing the number of necesary listeneres even more, but producing more events...
-- Jörn Zaefferer http://bassistance.de _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
