Indeed, Listen won't work for events that don't bubble. blur and focus
can be patched with the focusin/focusout approach.
I don't know anything about delegate. LiveQuery is the easiest to
implement and it should work just fine. If your site is really big, as
in, you have lots of bindings and you are constantly renewing them,
then event delegation might be necessary. Listen and Intercept are
similar, Intercept has full support for simple selectors, but it's
constantly calling .is(), so it might get slow if it's actioned too
often.
Listen only supports a set of selectors, but it should be almost 100%
scalable, as selectors are indexed.
In short, if LiveQuery works fast enough for your site, it'll be the
faster to use. If not, then, if the selectors Listen supports are
enough for you, it should be the faster approach, else Intercept might
be the one. Well.. it's up to you :)

Cheers
Ariel Flesler

On 7 feb, 21:01, bikuta <[EMAIL PROTECTED]> wrote:
> Cool thanks, but it doesn't work for blur and change. I guess that's
> because they don't bubble.
> I saw the intercept plugin and there's also livequery.
> Apparently there's also a delegate plugin, but I can't find it.
>
> I'm not sure what I should use to get the best performance. Any
> suggestions?
>
> On Feb 8, 2:08 am, Ariel Flesler <[EMAIL PROTECTED]> wrote:
>
>
>
> > This can help you do what Juha 
> > said:http://flesler.blogspot.com/2007/10/jquerylisten.html
>
> > Cheers
> > Ariel Flesler
>
> > On Feb 7, 11:37 am, "Juha Suni SC" <[EMAIL PROTECTED]> wrote:
>
> > > bikuta wrote:
> > > > The way I'm adding the item is just by adding another row to the html
> > > > table using the append() method. Should I be doing it another way?
>
> > > Instead of binding the events for all the rows individually, just bind the
> > > events once to the container element. It's events get triggered as the 
> > > event
> > > bubbles up the DOM, and there you can use e.target to check which element
> > > was actually clicked etc... This way you:
> > > A) Only bind events once, for one object instead of many (fast, clear)
> > > B) Don't need to bind events agains as rows are added (fast, simple).
>
> > > Search this group for "Event delegation" or "Event bubbling" and you 
> > > should
> > > find further information.
>
> > > --
> > > Suni- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -

Reply via email to