On Kangax's method: Perfect, thanks! I'm surprised that works. On 100s of delegates: Well 100s is an exaggeration, but I would guess about 200. There are about 40 different components, each responding to about 5 events. The components listen regardless if the component is in the page. Someone could be adding and removing the delegation if the component must be in the page, but managing this defeats the purpose of event delegation in the first place.
On Sep 14, 7:23 pm, John Resig <jere...@gmail.com> wrote: > > Best way to listen and remove multiple events for a single delegated > > event? (EX: delegate on submit, listen for keypress and click) > > I recommend using special events - this is built in to jQuery core and it's > precisely what it's used for (we were planning on using them to implement > submit and change delegation). > > http://brandonaaron.net/blog/2009/03/26/special-eventshttp://brandonaaron.net/blog/2009/06/4/jquery-edge-new-special-event-... > > > How to avoid browser sniffing. (EX: know that submit doesn't bubble in > > IE). > > This should be a good > pointer:http://thinkweb2.com/projects/prototype/detecting-event-support-witho... > > I was planning on using this technique for submit/change support, as well. > > --John --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---