Andy,

That is not entirely true. It only binds the event the first time it finds
the element. If you called unbind on a particular element, the event would
be unbound. The only time that event would be rebound is if the Live Query
was expired (.expire()) and then re-setup (.livequery()). However I wouldn't
rely on that functionality simply because that unbinding the event for one
element in a collection means that you need to think about constructing a
different selector. BTW ... calling .expire() would unbind all the events
and ... if you where using a class selector like this:

$('.doSomething').livequery('click', doSomething);

Then you changed one of the elements by removing the class "doSomething",
the event would be unbound.

--
Brandon Aaron

On 8/21/07, Andy Matthews <[EMAIL PROTECTED]> wrote:
>
>
> What happens though if you want to REMOVE the binding from an object.
> Using
> this plugin, it would Rebind it right afterwards.
>
> -----Original Message-----
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Eridius
> Sent: Tuesday, August 21, 2007 11:30 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: New Plugin: Live Query (previously called Behavior)
>
>
>
> This should be intergrated in the core jquery, i think it could replace
> .bind since it does the same thing but more without  have to change any
> parameters, just to to the change c.bind to .livequery.
>
>
> duma wrote:
> >
> > Oh, this is DOPE dude!!  This is destined to be integrated into
> > jQuery; this is a real problem for dynamic web pages right now.
> >
> > THANKS!!!
> > Sean
> >
> >
> > Brandon Aaron wrote:
> >>
> >> Some of you may be familiar with Behavior. It was a first attempt at
> >> implementing a "live DOM" experience. Behavior has been rewritten
> >> from the ground up with performance in mind and new features. It is
> >> now called Live Query. A couple of new features are that:
> >>
> >> * Live Queries work with attribute and class selectors
> >> * Live Query automatically unbinds events to unmatched elements and
> >> when the Live Query is expired
> >> * Live Query can fire a second callback for when an element is
> >> unmatched and when the Live Query is expired
> >>
> >> Check out the blog post for more details:
> >> http://blog.brandonaaron.net/2007/08/19/new-plugin-live-query/
> >>
> >> --
> >> Brandon Aaron
> >>
> >>
> >
> >
>
> --
> View this message in context:
>
> http://www.nabble.com/New-Plugin%3A-Live-Query-%28previously-called-Behavior
> %29-tf4296594s15494.html#a12258261
> Sent from the JQuery mailing list archive at Nabble.com.
>
>
>

Reply via email to