kylebarrow / chibi

A tiny JavaScript micro-library
573 stars 50 forks source link

Event Delegation support #15

Open tarciozemel opened 10 years ago

tarciozemel commented 10 years ago

It would be nice if Chibi has Event Delegation support - maybe as the 2nd argument of .on(), like many of popular solutions out there. So code like this would be possible:

$('ul').on('click', 'li', foo);
shirotech commented 8 years ago

+1, helps reduce number of bindings, and also could support elements created dynamically.