Yes, there is. There is a technique called event delegation which
consists of exactly that.

the Delegate plugin does it: 
http://www.danwebb.net/2008/2/8/event-delegation-made-easy-in-jquery
as does LiveQuery in its own way: http://brandonaaron.net/docs/livequery/

google 'event delegation' and you should get boatloads of information.

- ricardo

On Dec 18, 1:12 pm, fambi <fambizz...@tm4b.com> wrote:
> Hi All,
>
> Is there some kind of performance cost in setting up lots of event
> listeners?
>
> For example, rather than setting up lots of click event listeners,
> would it be better to set up a single one which then uses if/else to
> decide how to process it? Obviously, it might not always be practical,
> but I'm just after the theory side of things right now.
>
> Thanks.
>
> F.

Reply via email to