You're right, it doesn't work. Maybe NW Events could help here: http://code.google.com/p/nwevents/
It's an event manager and it can fire/propagate 'fake' events. - ricardo On Nov 22, 7:32 pm, "Jeffrey Kretz" <[EMAIL PROTECTED]> wrote: > I pretty sure it won't, because click() will fire trigger(), which will use > data() to lookup the bound event of the selected element, and not find > anything. > > Haven't tested this though. > > JK > > -----Original Message----- > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On > > Behalf Of ricardobeat > Sent: Saturday, November 22, 2008 7:43 AM > To: jQuery (English) > Subject: [jQuery] Re: event delegation - great, but how does one trigger the > handlers through code? > > Can't you just $('tbody td:eq(x)').click() ? The event should > propagate as normal and reach the tbody. I guess. > > On Nov 22, 1:11 am, Leeoniya <[EMAIL PROTECTED]> wrote: > > During event delegation, handlers are registered higher in the DOM > > tree and then filtered when the event is triggered. This is great if > > you have 2000 td/th cells, you can attach a listener to tbody and > > filter down. But would i trigger the event programatically? Since the > > handler isnt actually registered on the td cells, i cant figure out a > > way to do this except maybe construct a fake event with the source > > element by hand and pass it into the handler somehow?? > > > this is the biggest drawback to delegation that i have run into, it > > would be great to find a good way to manually trigger these events - > > if anyone has some advice, please share. > > > thanks, > > Leon