Event Delegation versus Event Handling…

I saw this useful tip earlier today. I know it sounds boring, but it’s actually a pretty good idea.

For a long while now I’ve been working on a thing called the ‘Performer Javascript library’ which works with Prototype to allow developers to attach Javascript code to repeating elements – such as a list of items fetched from a database – using unobtrusive and clean code. For people who write web apps this is a useful addition to have.

The link above gives another way to do this by capturingan event (for example a click) and watching the ‘bubbling’ of the event element to see what it should do in response. I’ll almost certainly be trying it out soon. However for the time being I’m working on finishing a little app written in PHP and Javascript which shows off the power of Prototype. I’ll put that here for your entertainment soon.